Compare commits
1 Commits
b6072b0e51
...
work
Author | SHA1 | Date | |
---|---|---|---|
ce1c4c36dd |
13
Dockerfile
13
Dockerfile
@@ -1,13 +1,8 @@
|
|||||||
FROM debian:bullseye-slim
|
FROM debian:trixie-slim
|
||||||
#
|
#
|
||||||
RUN apt update && apt install curl -y
|
COPY ookla_speedtest_cli.list requirements.txt init.sh /
|
||||||
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash
|
RUN apt update && apt install curl python3 python3-pip iputils-ping -y && pip3 install -r /requirements.txt --break-system-packages && chmod +x /init.sh && curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash
|
||||||
RUN apt install python3 python3-pip iputils-ping speedtest -y
|
RUN apt update && apt install speedtest -y && apt clean
|
||||||
COPY logspeedtest.py /usr/local/bin/
|
COPY logspeedtest.py /usr/local/bin/
|
||||||
COPY requirements.txt /
|
|
||||||
COPY init.sh /
|
|
||||||
RUN chmod +x /init.sh
|
|
||||||
RUN chmod +x /usr/local/bin/logspeedtest.py
|
RUN chmod +x /usr/local/bin/logspeedtest.py
|
||||||
RUN pip3 install -r /requirements.txt
|
|
||||||
RUN apt clean
|
|
||||||
CMD ["/init.sh"]
|
CMD ["/init.sh"]
|
@@ -33,4 +33,4 @@ while(True):
|
|||||||
maxlatency=respjson['ping']['high']
|
maxlatency=respjson['ping']['high']
|
||||||
result = addinfluxrecord(downspeed,upspeed,pktloss,jitter,latencyavg,minlatency,maxlatency)
|
result = addinfluxrecord(downspeed,upspeed,pktloss,jitter,latencyavg,minlatency,maxlatency)
|
||||||
print(result)
|
print(result)
|
||||||
time.sleep(300)
|
time.sleep(300)
|
||||||
|
5
ookla_speedtest_cli.list
Normal file
5
ookla_speedtest_cli.list
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# this file was generated by packagecloud.io for #
|
||||||
|
# the repository at https://packagecloud.io/ookla/speedtest-cli
|
||||||
|
|
||||||
|
deb [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main
|
||||||
|
deb-src [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main
|
Reference in New Issue
Block a user