add Dockerfile
This commit is contained in:
33
tools/ws/Dockerfile
Normal file
33
tools/ws/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
FROM python:latest
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
|
||||
|
||||
ARG APP_DIR="/opt/app"
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y libmariadbclient-dev && \
|
||||
pip3 install mariadb && \
|
||||
pip3 install connexion && \
|
||||
pip3 install connexion[swagger-ui] && \
|
||||
pip3 install uwsgi && \
|
||||
pip3 install flask-cors
|
||||
|
||||
RUN \
|
||||
mkdir -p ${APP_DIR} && \
|
||||
useradd -d ${APP_DIR} -u 1000 user
|
||||
|
||||
COPY *.py ${APP_DIR}/
|
||||
COPY swagger.yaml ${APP_DIR}/
|
||||
COPY server.ini ${APP_DIR}/
|
||||
|
||||
USER 1000:1000
|
||||
WORKDIR ${APP_DIR}
|
||||
|
||||
EXPOSE 5000
|
||||
EXPOSE 9191
|
||||
|
||||
CMD [ "uwsgi", "server.ini" ]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user