From 02cc464098432747db3175aaa42b09cb813d877e Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 10 Aug 2024 13:52:02 +0100 Subject: [PATCH] Switch to Alpine-based docker images --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 28220622..d1ea238c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,20 @@ -FROM python:3.10.11 +FROM python:3.10.11-alpine -RUN groupadd -g 5123 cdb && \ - useradd -r -u 5123 -g cdb cdb +RUN addgroup --gid 5123 cdb && \ + adduser --uid 5123 -S cdb -G cdb WORKDIR /home/cdb +RUN \ + apk add --no-cache postgresql-libs git bash && \ + apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev g++ + RUN mkdir /var/cdb RUN chown -R cdb:cdb /var/cdb COPY requirements.lock.txt requirements.lock.txt -RUN pip install -r requirements.lock.txt -RUN pip install gunicorn +RUN pip install -r requirements.lock.txt && \ + pip install gunicorn COPY utils utils COPY config.cfg config.cfg