ci, docker, config stuff
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
|
||||
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 "python digitaltwin1.py -f ./config/config.ini"
|
||||
|
Reference in New Issue
Block a user