forked from piontec/netperf-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.netperf
More file actions
26 lines (24 loc) · 831 Bytes
/
Dockerfile.netperf
File metadata and controls
26 lines (24 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM alpine:3.7 as builder
# using an untagged 2.7.1 to fix --enable-demo
ARG GITREF=3bc455b
ENV VER ${GITREF}
RUN apk update
RUN apk add --no-cache wget build-base autoconf automake texinfo
WORKDIR /tmp
RUN wget https://github.com/HewlettPackard/netperf/tarball/${VER} -O - | tar -xz
WORKDIR /tmp/HewlettPackard-netperf-${VER}
RUN ./autogen.sh
RUN ./configure --enable-demo --build=arm-unknown-linux-gnu
RUN make
FROM alpine:3.17
ARG GITREF=3bc455b
ENV VER ${GITREF}
ENV SERVER 198.18.18.18
ENV PORT 12865
ENV DURATION 60
ENV FORMAT m
ENV INTERVAL 10
WORKDIR /app
COPY --from=builder /tmp/HewlettPackard-netperf-${VER}/src/netserver /usr/bin/
COPY --from=builder /tmp/HewlettPackard-netperf-${VER}/src/netperf /usr/bin/
CMD netperf -H $SERVER -f $FORMAT -l $DURATION -p $PORT -D $INTERVAL | tee "netperf-out-$(date +%s).txt"