Install SmokePing Inside Docker Container in Linux

Install SmokePing Inside Docker Container in Linux

SmokePing is a latency measurement tool which provides web UI to view results. SmokePing can measure, store and display latency, latency distribution and packet loss.

This tutorial explains how to install SmokePing inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install SmokePing

  • Host network

Run the following command to create a container for SmokePing that uses host network:

docker run -d --name=smokeping --restart=always --network=host \
    -v /opt/smokeping/data:/data \
    -v /opt/smokeping/config:/config \
    linuxserver/smokeping
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, SmokePing service is listening on port 80. It can be changed with -p option.

docker network create app-net
docker run -d --name=smokeping --restart=always --network=app-net \
    -p 8080:80 \
    -v /opt/smokeping/data:/data \
    -v /opt/smokeping/config:/config \
    linuxserver/smokeping

Note:

  • By default, SmokePing is configured to ping a few sites. To ping more sites, you can edit Targets file:
sudo nano /opt/smokeping/config/Targets

To apply changes, restart container:

docker restart smokeping

Testing SmokePing

To access web UI, open a web browser and go to http://<IP_ADDRESS>, where <IP_ADDRESS> is the IP address of the system. After a few minutes, you will see the first data in the graphs.

SmokePing Inside Docker Container in Linux

Uninstall SmokePing

To completely remove SmokePing, remove its container:

docker rm --force smokeping

Remove SmokePing image:

docker rmi linuxserver/smokeping

You can also remove SmokePing data:

sudo rm -rf /opt/smokeping

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.