commit ff94f8a35c2bfdda45857179d0c35854c21ae1fb Author: david Date: Tue Jan 2 20:32:10 2024 +0100 initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a786a8b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:latest +LABEL Description="This image is based on ubuntu:latest and is used to run the Ookla Speedtest CLI" \ + Author="david@socialnerds.org" \ + Version="0.1.0" \ + License="MIT" + +RUN apt-get update && apt-get install -y sudo curl && \ + curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash && \ + apt-get install speedtest + +COPY entrypoint.sh /root/ + +ENTRYPOINT ["/root/entrypoint.sh"] + +CMD [""] diff --git a/README.md b/README.md new file mode 100644 index 0000000..b490988 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# speedtest-container + +Multi-arch container image for the Ookla speedtest CLI. It is based on [ubuntu:latest](https://hub.docker.com/_/ubuntu) and installs the speedtest binary as described in the official Ubuntu [install instructions](https://www.speedtest.net/apps/cli) on the Ookla Speedtest website. + +## Usage example + +``` +# auto-detect nearest server +docker run --rm -it git.socialnerds.org/david/speedtest-container + +# specify specific server +docker run --rm -it git.socialnerds.org/david/speedtest-container -s 3744 +``` + +## Related infos + +- [List of Ookla speedtest servers](https://gist.github.com/ofou/654efe67e173a6bff5c64ba26c09d058) diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..3e445e5 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +speedtest --accept-license --accept-gdpr $@