From fbf25a8657db189d33c23caf26e2becaf2d18df8 Mon Sep 17 00:00:00 2001 From: "Wang, Long" Date: Mon, 6 May 2019 09:50:57 +0800 Subject: [PATCH] add iperf microservice based on the individual iperf bundle --- .travis.yml | 1 + iperf/Dockerfile | 13 +++++++++++++ iperf/README.md | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 iperf/Dockerfile create mode 100644 iperf/README.md diff --git a/.travis.yml b/.travis.yml index 433c894..c3b9e80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ env: - DOCKERFILE_DIR=golang - DOCKERFILE_DIR=haproxy - DOCKERFILE_DIR=httpd + - DOCKERFILE_DIR=iperf - DOCKERFILE_DIR=machine-learning-ui - DOCKERFILE_DIR=machine-learning - DOCKERFILE_DIR=mariadb diff --git a/iperf/Dockerfile b/iperf/Dockerfile new file mode 100644 index 0000000..71f6d9d --- /dev/null +++ b/iperf/Dockerfile @@ -0,0 +1,13 @@ +FROM clearlinux:latest +MAINTAINER long1.wang@intel.com + +ARG swupd_args + +RUN swupd update --no-boot-update $swupd_args && \ + swupd bundle-add iperf $swupd_args + +# Define default command +ENTRYPOINT ["iperf3"] + +# Expose ports +EXPOSE 5201 diff --git a/iperf/README.md b/iperf/README.md new file mode 100644 index 0000000..b34f7a0 --- /dev/null +++ b/iperf/README.md @@ -0,0 +1,22 @@ +# iperf3 service on clearlinux +Iperf is a widely used tool for network performance measurement and tuning. + +## Build +``` +sudo docker build -t clearlinux/iperf . +``` + +## Run as Server: +``` +sudo docker run -it --rm --name=iperf-srv -p 5201:5201 clearlinux/iperf -s +``` + +## Run as Client (first get server IP address): +``` +sudo docker run -it --rm --network=host clearlinux/iperf -c +``` + +## Extra Build ARGs +- ``swupd_args`` Specifies [SWUPD](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags + +Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg