Code: Select all
FROM alpine:latest AS build
RUN wget -O speedtest.tgz \
"https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-aarch64.tgz" \
&& tar zxvf speedtest.tgz \
&& chmod +x speedtest && chown root:root speedtest
RUN rm speedtest.tgz
RUN wget https://curl.se/ca/cacert.pem
From scratch
COPY --from=build /speedtest /bin/
COPY --from=build /cacert.pem /
ENTRYPOINT ["/bin/speedtest", "--accept-license"]
CMD [ "--ca-certificate=/cacert.pem" ]
11:17:03 container,info,debug Speedtest by Ookla
11:17:03 container,info,debug Server: Bell Canada - ABCD (id: 12345)
11:17:03 container,info,debug ISP: Bell Canada
11:17:03 container,info,debug Idle Latency: 1.00 ms (jitter: 0.23ms, low: 0.98ms, high: 1.84ms)
11:17:08 container,info,debug r Download: 1610.22 Mbps (data used: 727.5 MB)
11:17:08 container,info,debug 4.63 ms (jitter: 0.39ms, low: 2.96ms, high: 6.66ms)
11:17:18 container,info,debug r Upload: 1015.11 Mbps (data used: 1.2 GB)
11:17:18 container,info,debug 13.60 ms (jitter: 1.53ms, low: 3.69ms, high: 24.74ms)
11:17:18 container,info,debug Packet Loss: 0.0%
11:17:18 container,info,debug Result URL: https://www.speedtest.net/result/c/xyz