-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 803 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 803 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
30
31
32
33
34
35
36
37
FROM python:3.13-alpine
LABEL maintainer="IITG <iitggithub@gmail.com>"
RUN set -eux; \
mkdir -p /app/config; \
apk update; \
apk add --no-cache mtr \
tcptraceroute \
traceroute \
bind-tools \
iperf \
iperf3; \
chmod u+s /usr/sbin/mtr /usr/bin/traceroute /usr/bin/tcptraceroute /bin/ping; \
rm -rf /var/cache/apk/*
RUN pip install flask
# Security updates
RUN apk upgrade libexpat openssl
COPY config/config_example.json /app/config/
COPY static /app/static/
COPY templates /app/templates/
COPY app.py /app/
VOLUME ["/app/config"]
EXPOSE 5000
RUN adduser -D iperf-web
RUN chown -R iperf-web:iperf-web /app
USER iperf-web
WORKDIR /app
CMD ["python", "app.py"]