-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 695 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 695 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.23.3
LABEL maintainer="Michael Oberdorf IT-Consulting <info@oberdorf-itc.de>"
LABEL site.local.program.version="2.2.0"
RUN apk upgrade --available --no-cache --update \
&& apk add --no-cache --update \
python3=3.12.12-r0 \
py3-pip=25.1.1-r1 \
# Cleanup APK
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* \
# Prepare persistant storage
&& mkdir -p /data \
&& chown 1434:1434 /data
COPY --chown=root:root /src /
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages
EXPOSE 5020/tcp
EXPOSE 5020/udp
EXPOSE 9090/tcp
USER 1434:1434
VOLUME [ "/data" ]
# Start Server
ENTRYPOINT ["python", "-u", "/app/modbus_server.py"]