Verify Network Performance in Docker Containers

If you're experiencing connectivity issues, you can use a Docker container to test your network speeds.




1️⃣ Pull the Python 3.9 Slim Docker Container

First, pull the Python 3.9 Slim Docker image to use for testing:

docker pull python:3.9-slim


2️⃣ Run the Docker Container

Start the container with the following command:

docker run -it --name speedtest-container python:3.9-slim /bin/bash


This command will start the container and open an interactive shell session.


3️⃣ Install the Speedtest Tool

Once inside the container, install the speedtest-cli tool using pip:    

pip install speedtest-cli


If you encounter issues, verify that Python and pip are installed with:

python --version
pip --version


4️⃣ Test the Network Speed

After the installation is complete, run the speed test:

speedtest-cli


The tool will provide the current network download and upload speeds, along with other metrics such as ping.

   

5️⃣ Cleanup the Docker Container

After completing the network test, you may remove the container to free up resources:

docker rm -f speedtest-container
If you see that your network speeds are less than expected, please open a ticket with us. We are aware of an issue between IO and Docker that limits the full capability of your network and are working towards a fix.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article