Files
digitaltwin1/Dockerfile
Wolfgang Hottgenroth a5f9527f4d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
read coils 4
2025-12-15 11:20:46 +01:00

32 lines
631 B
Docker

FROM python:latest
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
LABEL ImageName="registry.hottis.de/wolutator/digitaltwin1"
ARG APP_DIR="/opt/app"
ARG CONF_DIR="${APP_DIR}/config"
RUN \
apt update && \
pip3 install loguru && \
pip3 install pymodbus==3.6.3 && \
pip3 install paho-mqtt
RUN \
mkdir -p ${APP_DIR} && \
mkdir -p ${CONF_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
COPY src/*.py ${APP_DIR}/
COPY config.ini ${CONF_DIR}/
USER 1000:1000
WORKDIR ${APP_DIR}
VOLUME ${CONF_DIR}
CMD [ "/usr/local/bin/python", "digitaltwin1.py", "-f", "./config/config.ini" ]