-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (31 loc) · 1.18 KB
/
Copy pathDockerfile
File metadata and controls
46 lines (31 loc) · 1.18 KB
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
38
39
40
41
42
43
44
45
46
FROM alpine:3.24.1 AS base
RUN apk upgrade --available --no-cache --update \
&& apk add --no-cache --update \
python3=3.14.5-r0 \
py3-pip=26.1.2-r0 \
# Cleanup APK
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
# Compiling python modules
FROM base AS builder
RUN apk add --no-cache --update \
g++=15.2.0-r5 \
python3-dev=3.14.5-r0 \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
COPY --chown=root:root FloatToHex /FloatToHex
WORKDIR /FloatToHex
RUN pip3 install --no-cache-dir -r /FloatToHex/requirements.txt --break-system-packages \
&& python3 setup.py install
# Building the docker image with already compiled modules
FROM base
LABEL maintainer="Michael Oberdorf IT-Consulting <info@oberdorf-itc.de>"
LABEL site.local.program.version="1.1.0"
COPY --from=builder /usr/lib/python3.14/site-packages /usr/lib/python3.14/site-packages
RUN apk add --no-cache --update \
libstdc++=15.2.0-r5 \
py3-wheel=0.47.0-r0 \
py3-pandas=3.0.3-r0
COPY --chown=root:root /src /
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages
USER 3748:3748
# Start Server
ENTRYPOINT ["python", "-u", "/app/modbus_client.py"]