xref: /iperf/contrib/Dockerfile (revision b95a580f)
1*b95a580fSbobobo1618# Instructions:
2*b95a580fSbobobo1618# - Configure for a static binary: ./configure --enable-static "LDFLAGS=--static" --disable-shared --without-openssl
3*b95a580fSbobobo1618# - Build: make
4*b95a580fSbobobo1618# - Build Docker image: docker build -t iperf3 -f contrib/Dockerfile .
5*b95a580fSbobobo1618#
6*b95a580fSbobobo1618# Example invocations:
7*b95a580fSbobobo1618# - Help: docker run iperf3 --help
8*b95a580fSbobobo1618# - Server: docker run -p 5201:5201 -it iperf3 -s
9*b95a580fSbobobo1618# - Client: docker run -it iperf3 -c 192.168.1.1 (note: since this is a minimal image and does not include DNS, name resolution will not work)
10*b95a580fSbobobo1618FROM scratch
11*b95a580fSbobobo1618COPY src/iperf3 /iperf3
12*b95a580fSbobobo1618COPY tmp /tmp
13*b95a580fSbobobo1618ENTRYPOINT ["/iperf3"]
14*b95a580fSbobobo1618EXPOSE 5201
15*b95a580fSbobobo1618CMD ["-s"]
16