MikroTik Solutions

Artifact [996b3f8fc0]
Login

Artifact 996b3f8fc0fb29f9742db4a0bd2ca1c2b669d9d3f94a83e56a307104acd25cdd:


# 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

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

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