iperf3 in an Alpine Linux-based Docker image.
To run iperf3 as a server in the foreground:
docker run -it --rm --network=host ghcr.io/mattkobayashi/iperf3 --server
Or alternatively, you can run it as a daemon in the background:
docker run -d --name iperf3-server --network=host ghcr.io/mattkobayashi/iperf3 --server
There's a few ways to do this, but the basic gist is:
docker run -it --rm --network=host ghcr.io/mattkobayashi/iperf3 --client <SERVER_IP> <OPTIONS>
-
iperf3 has a lot of tunables and options available (especially on the client side). These are all documented here.
-
The use of
network=hostis recommended so as to avoid the Docker network proxy and ensure the best possible throughput for test conditions. It is possible to port forward with the Docker proxy, however performance may be affected. For example, you can run a server like this:docker run -d --name iperf3-server -p 5201:5201/tcp -p 5201:5201/udp ghcr.io/mattkobayashi/iperf3 --server