MikroTik Solutions

Artifact [c9300b4575]
Login

Artifact [c9300b4575]

Artifact c9300b45756de297a0badd1ade881858a3df4b9c042154e39b065af9eb92db48:


# syntax=docker/dockerfile:1.0

## STAGE 1: Build the static iperf3 binary
FROM alpine:edge AS build
ARG VERSION=master
RUN apk add --no-cache build-base git
RUN git clone --depth 1 --branch ${VERSION} https://github.com/esnet/iperf
RUN iperf/configure CFLAGS="-Os -s" --enable-static-bin
RUN make -j12
RUN mkdir /empty

## STAGE 2: Build the container proper
FROM scratch
COPY --from=build /src/iperf3 /bin/
COPY --from=build /empty/ /tmp/

# Start it as a server.
EXPOSE 5201/tcp 5201/udp
ENTRYPOINT [ "/bin/iperf3" ]
CMD [ "-s" ]