Skip to content

Connectify/docker-iperf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

docker-iperf

Docker image for iperf3, built from source from the Connectify fork. By default this builds the whl/3.21-data-integrity branch, which adds the --data-integrity flag for verifying data correctness during transfers.

Supports linux/amd64 and linux/arm64 via Docker buildx.

Quick Start

Run an iperf3 server:

docker run -d -p 5201:5201 connectify/iperf

Run a client against it:

docker run --rm connectify/iperf -c <server-ip>

Building

Standard build (current platform)

docker build -t connectify/iperf .

Multi-arch build (amd64 + arm64)

# Create a buildx builder (one-time setup)
docker buildx create --use --name multiarch

# Build and push for both architectures
docker buildx build --platform linux/amd64,linux/arm64 \
  -t connectify/iperf:latest --push .

Custom branch or repo

Use build args to build a different branch or from a different iperf fork:

# Build upstream esnet/iperf master
docker build \
  --build-arg IPERF_REPO=https://github.com/esnet/iperf.git \
  --build-arg IPERF_BRANCH=master \
  -t iperf:upstream .

# Build a specific tag
docker build \
  --build-arg IPERF_BRANCH=3.18 \
  -t connectify/iperf:3.18 .

Running

Server mode (default)

docker run -d -p 5201:5201 --name iperf-server connectify/iperf

The container runs iperf3 -s by default, listening on port 5201.

Client mode

docker run --rm connectify/iperf -c <server-ip>

With data integrity checking

# Server
docker run -d -p 5201:5201 connectify/iperf

# Client with data integrity verification
docker run --rm connectify/iperf -c <server-ip> --data-integrity

UDP test

docker run --rm connectify/iperf -c <server-ip> -u -b 1G

Additional options

Any iperf3 flags can be appended after the image name:

docker run --rm connectify/iperf -c <server-ip> -P 4 -t 30 --json

Run --help to see all available options:

docker run --rm connectify/iperf --help

Build Arguments

Argument Default Description
IPERF_REPO https://github.com/Connectify/iperf.git Git repository URL to clone
IPERF_BRANCH whl/3.21-data-integrity Git branch or tag to build
ALPINE_VERSION 3.21 Alpine Linux version for both build and runtime stages

About

Dockerfile to setup an iperf server for network benchmarking https://iperf.fr/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 100.0%