Minimal docker container for testing your connection bandwidth using speedtest-cli and logging it to csv files organized by date as follows:
2020-03-24.csv
2020-03-25.csv
docker run
docker run -d --network host -e 'CRON_STRINGS=*/5 * * * * /speedtest.sh' -v /home/pi/isp-speedtest:/isp --name isp-speedtest hvalev/isp-speedtest
docker-compose
version: "3.7"
services:
isp-speedtest:
image: hvalev/isp-speedtest
container_name: isp-speedtest
network_mode: host
environment:
- 'CRON_STRINGS=*/5 * * * * /speedtest.sh'
volumes:
- /home/pi/isp-speedtest/:/isp/
restart: always
docker build https://github.com/hvalev/isp-speedtest-docker.git --tag isp-speedtest
Some code used from here. Setting Cron strings as env variable approach used from here.
Bear in mind that speedtest-cli causes a lot of connections to spawn and if ran too frequently can slowly overwhelm your router! The default setting of 5 minutes should be okay. I hold no responsibility if you ddos yourself. Limitations are also imposed by the speedtest-cli tool. A detailed list of those for further reading can be found here.
Content type
Image
Digest
Size
19.9 MB
Last updated
over 5 years ago
docker pull hvalev/isp-speedtest:0.1