elo-rezept-rechner/Dockerfile

22 lines
451 B
Docker
Raw Normal View History

2024-01-30 11:54:51 +01:00
FROM python:3.12-alpine3.19
ARG APP_DIR="/opt/app"
2024-02-01 09:48:54 +01:00
ARG VERSION_ID1="x"
ARG VERSION_ID2="alpha"
2024-01-30 11:54:51 +01:00
COPY ./src/ ${APP_DIR}/
COPY start.sh ${APP_DIR}/
WORKDIR ${APP_DIR}
2024-01-30 14:59:46 +01:00
RUN \
apk add --no-cache build-base libpq-dev && \
2024-02-01 09:48:54 +01:00
pip install -r requirements.txt && \
sed -i -e 's/VERSION_ID1/'$VERSION_ID1'/' ${APP_DIR}/templates/index.html && \
sed -i -e 's/VERSION_ID2/'$VERSION_ID2'/' ${APP_DIR}/templates/index.html
2024-01-30 11:54:51 +01:00
EXPOSE 8080
CMD "./start.sh"