Skip to content

Commit b86b2ad

Browse files
committed
[netload] netload v2 as a server
1 parent 59b2c88 commit b86b2ad

File tree

7 files changed

+34
-2
lines changed

7 files changed

+34
-2
lines changed

netload/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
v1
2+
start.sh
3+
README.md

netload/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
FROM alpine:3.14.0
1+
FROM python:3.8-alpine3.14
22
MAINTAINER LWQ kenan3015@gmail.com
33

44
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
55
&& apk add --update --no-cache bash wget \
66
&& rm -rf /var/cache/apk/*
77

8-
ADD main.sh /tmp/main.sh
8+
WORKDIR /netload
9+
10+
# 制作负载文件
11+
RUN wget -O load_1m https://github.com/electron/electron/releases/download/v15.0.0-alpha.3/electron-api.json \
12+
&& wget -O load_10m https://github.com/electron/electron/releases/download/v15.0.0-alpha.3/chromedriver-v15.0.0-alpha.3-win32-arm64.zip
13+
14+
EXPOSE 8080
15+
CMD ["python", "-m", "http.server", "8080"]

netload/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Netload
2+
3+
# v2(current)
4+
a python server for request file
5+
6+
files contains file_1m and file_10m which download from `https://github.com/electron/electron/releases`
7+
8+
# v1
9+
a script that wget url in loop

netload/load.file

Whitespace-only changes.

netload/v1/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM alpine:3.14.0
2+
MAINTAINER LWQ kenan3015@gmail.com
3+
4+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
5+
&& apk add --update --no-cache bash wget \
6+
&& rm -rf /var/cache/apk/*
7+
8+
ADD main.sh /tmp/main.sh
File renamed without changes.

netload/v1/start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#! /bin/bash
2+
3+
docker run -d --name netload \
4+
netload:v1 \
5+
/tmp/main.sh 300k 1 https://wangdoc.com/bash/condition.html

0 commit comments

Comments
 (0)