FROM vecps:base-v0.1.1

LABEL maintainer="Tosone <i@tosone.cn>"

ARG IPERF_VERSION=3.12

RUN git clone --depth 1 --branch ${IPERF_VERSION} https://github.com/tosone/iperf.git iperf

RUN cd iperf && \
    ./configure --enable-static-bin && \
    make -j4 && \
    mkdir -p /app/iperf/bin && \
    cp ./src/iperf3 /app/iperf/bin && \
    strip /app/iperf/bin/iperf3
