2024-08-10 14:52:02 +02:00
|
|
|
FROM python:3.10.11-alpine
|
2019-01-09 22:58:11 +01:00
|
|
|
|
2024-08-10 14:52:02 +02:00
|
|
|
RUN addgroup --gid 5123 cdb && \
|
|
|
|
adduser --uid 5123 -S cdb -G cdb
|
2019-11-14 23:53:46 +01:00
|
|
|
|
2019-01-09 22:58:11 +01:00
|
|
|
WORKDIR /home/cdb
|
|
|
|
|
2024-08-10 14:52:02 +02:00
|
|
|
RUN \
|
2024-09-28 18:41:01 +02:00
|
|
|
apk add --no-cache postgresql-libs git bash unzip && \
|
2024-08-10 14:52:02 +02:00
|
|
|
apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev g++
|
|
|
|
|
2020-01-18 02:20:32 +01:00
|
|
|
RUN mkdir /var/cdb
|
|
|
|
RUN chown -R cdb:cdb /var/cdb
|
|
|
|
|
2020-07-16 15:26:26 +02:00
|
|
|
COPY requirements.lock.txt requirements.lock.txt
|
2024-08-10 14:52:02 +02:00
|
|
|
RUN pip install -r requirements.lock.txt && \
|
|
|
|
pip install gunicorn
|
2019-01-09 22:58:11 +01:00
|
|
|
|
2019-11-14 23:24:37 +01:00
|
|
|
COPY utils utils
|
2020-01-18 02:20:32 +01:00
|
|
|
COPY config.cfg config.cfg
|
2019-11-16 00:51:42 +01:00
|
|
|
COPY migrations migrations
|
|
|
|
COPY app app
|
2022-01-07 20:42:52 +01:00
|
|
|
COPY translations translations
|
2019-11-14 23:53:46 +01:00
|
|
|
|
2022-01-07 20:42:52 +01:00
|
|
|
RUN pybabel compile -d translations
|
2020-01-18 02:20:32 +01:00
|
|
|
RUN chown -R cdb:cdb /home/cdb
|
|
|
|
|
2019-11-14 23:53:46 +01:00
|
|
|
USER cdb
|