Filled Docker Labels and ENVs to identify the git revision it was build from (#250)

Added labels and env vars to identify the git revion a container was
build from to have a more transparent build flow of untaged images.
This commit is contained in:
2023-10-21 18:13:03 +02:00
committed by GitHub
parent 88f0673470
commit ad7aa3e53b
3 changed files with 27 additions and 4 deletions

View File

@@ -1,8 +1,15 @@
FROM python:3.11-slim as base
LABEL AUTHOR="AKI Projektseminar 23"
LABEL AUTHOR="AKI Projektseminar 23" \
PROJECT="Transparenzregister" \
ORGANISATION="fh-swf.de"
ENV SQLALCHEMY_SILENCE_UBER_WARNING="1"
ARG APP_HOME="transparenzregister"
ARG GIT_HASH
ENV GIT_HASH=${GIT_HASH}
LABEL GIT_HASH=${GIT_HASH}
WORKDIR /${APP_HOME}/
USER root
RUN apt update -y && \
@@ -15,11 +22,15 @@ RUN pip install --find-links=dist aki-prj23-transparenzregister --no-cache-dir
FROM base as ingest
LABEL PART="DATA_INGESTOR"
RUN pip install --find-links=dist aki-prj23-transparenzregister[ingest] --no-cache-dir && \
rm dist/ -R
FROM base as data-transformation
LABEL PART="DATA-TRANSFORMATION"
RUN pip install --find-links=dist aki-prj23-transparenzregister[transformation] --no-cache-dir && \
rm dist/ -R
@@ -28,6 +39,8 @@ CMD ["--level", "DEBUG"]
FROM base as web-server
LABEL PART="WEB-SERVER"
RUN pip install --find-links=dist aki-prj23-transparenzregister[web-server] --no-cache-dir && \
rm dist/ -R