-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 837 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 837 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
27
28
29
FROM alpine:3.19.1
LABEL maintainer="Stacklegend"
LABEL version="3.19.1"
LABEL description="Simple iperf3 server based on Alpine"
# install iperf3 and create non-root user
RUN apk add --no-cache iperf3 \
&& adduser -S iperf
USER iperf
# Expose the default iperf3 server ports
EXPOSE 5201/tcp 5201/udp
# entrypoint allows you to pass your arguments to the container at runtime
# very similar to a binary you would run. For example, in the following
# docker run -it <IMAGE> --help' is like running 'iperf --help'
ENTRYPOINT ["iperf3"]
# Health check floods log window quite a bit.
# If needed you can change/disable health check when starting container.
# See Docker run reference documentation for more information.
HEALTHCHECK --timeout=3s \
CMD iperf3 -k 1 -c 127.0.0.1 || exit 1
# iperf3 -s = run in Server mode
CMD ["-s"]