diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d25cd77a7c979f270706c083be096fad201e7e8a..ea8c658f98700f2f05f641c2bf6d4b4d4be9255f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,9 @@ stages: - test - release +variables: + DOCKER_HUB_REPO: ccoley/iperf + .build: @@ -79,6 +82,7 @@ test:iperf3: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH before_script: - crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" + - crane auth login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_TOKEN" index.docker.io release:iperf2: extends: .release @@ -86,6 +90,8 @@ release:iperf2: script: - crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2 2.2 - crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2 2 + - crane copy ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf2 ${DOCKER_HUB_REPO}:2.2 + - crane tag ${DOCKER_HUB_REPO}:2.2 2 release:iperf3: extends: .release @@ -93,5 +99,7 @@ release:iperf3: script: - crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3 3.17 - crane tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3 3 + - crane copy ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-iperf3 ${DOCKER_HUB_REPO}:3.17 + - crane tag ${DOCKER_HUB_REPO}:3.17 3 # vi: set ts=2 sw=2 et ft=yaml: diff --git a/README.md b/README.md index 07e6a274c61478f137bfa0bbe4d71b562b3cf08d..d5ed2e5fa40176556971f6925e0708ad686ca8a0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,44 @@ -# iPerf +# iPerf Image -This is an image for running iPerf. Both iPerf 2 and iPerf 3 are available. +This repo builds two Docker images meant for use as an iperf server. -iPerf runs in server mode with default port and settings. +## Tags + +There are images available with iPerf 2 or iPerf 3. + +- `3.17`, `3` contain iPerf 3 +- `2.2`, `2` contain iPerf 2 + +## Usage + +The images default to running in server mode on the default port, which is 5001 for iPerf 2 and 5201 for iPerf 3. + +### Server Mode + +Running an iPerf 3 server: + +```bash +docker run --rm -p 5201:5201 ccoley/iperf:3 +``` + +Running an iPerf 2 server: + +```bash +docker run --rm -p 5001:5001 ccoley/iperf:2 +``` + +### Client Mode + +Running iPerf 3 in client mode: + +```bash +docker run --rm -t ccoley/iperf:3 -c <iperf3-server> +``` + +Running iPerf 2 in client mode: +```bash +docker run --rm -t ccoley/iperf:2 -c <iperf2-server> -i 1 +```