Search
Close this search box.

Speed test of internet via one liner with Docker

speed test via one liner command and docker

Table of Contents

1. Introduction

Want to run network speed test via command like a boss?
You don’t want to install any packages?
You want to avoid Ads full webpages that loading infinitive?

Simply run docker one-liner and benefit from simplicity.

In this step by step tutorial I will show you how to do it.

2. Network test provider

I found Ookla giving CLI tool that can be used as one liner for testing. I just decided to dockerize it and as a consequence install it inside sandbox and not in my local laptop.

3. Using Docker

You already know most of my tutorials and you already noticed that I am using Docker a lot. Here you will use it too.

Below Dockerfile, create it

				
					FROM debian:stable-slim

RUN apt-get update && apt-get install -y curl
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash
RUN apt-get install speedtest

ARG UID=10001
RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "/nonexistent" \
    --shell "/sbin/nologin" \
    --no-create-home \
    --uid "${UID}" \
    appuser
USER appuser

ENTRYPOINT [ "speedtest" ]
				
			

Lines 4 and 5 are where speedtest program is installed.

Now build docker image and assign some tag

				
					docker build -t toughcoding/oklaspeedtest:latest .
				
			

Then run it accepting privacy policies.

				
					docker run toughcoding/oklaspeedtest:latest --accept-license --accept-gdpr
				
			

example results:

				
					   Speedtest by Ookla

      Server: PITCHILE - Santiago (id: 47008)
         ISP: Latitude-sh
Idle Latency:   419.23 ms   (jitter: 76.91ms, low: 292.64ms, high: 467.29ms)
    Download:     6.55 Mbps (data used: 8.2 MB)                                                   
                662.66 ms   (jitter: 38.64ms, low: 240.10ms, high: 1545.95ms)
      Upload:     9.38 Mbps (data used: 15.8 MB)                                                   
                327.14 ms   (jitter: 43.45ms, low: 234.98ms, high: 1590.06ms)
 Packet Loss:     0.0%
  Result URL: https://www.speedtest.net/result/c/f827a8d9-3422-47a5-834c-7719898f64dc

				
			

4. Summary

In this knowledge article you have learned how to quickly dockerize command line tool in order to test your Internet service provider (ISP).

I know you are as much excited as me by bypassing web browser. Now you can use it on your own.

Have a nice coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow me on LinkedIn
Share the Post:

Enjoy Free Useful Amazing Content

Related Posts