summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/workloads/iperf/Dockerfile
blob: 9704c506c9cfaa548b7c9f82fefebc4eb8b09c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM ubuntu:18.04

RUN set -x \
        && apt-get update \
        && apt-get install -y \
            iperf \
        && rm -rf /var/lib/apt/lists/*

# Accept a host parameter.
ENV host ""
ENV port 5001

# Start as client if the host is provided.
CMD ["sh", "-c", "test -z \"${host}\" && iperf -s || iperf -f K --realtime -c ${host} -p ${port}"]