From 36b2f6b54d12127d6f98cdd23d2e9f9b0a098316 Mon Sep 17 00:00:00 2001 From: vermaas <vermaas@astron.nl> Date: Tue, 7 Feb 2023 09:13:27 +0100 Subject: [PATCH] update python base image for docker --- atdb/Dockerfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/atdb/Dockerfile b/atdb/Dockerfile index 4f7cff76..feaec65b 100644 --- a/atdb/Dockerfile +++ b/atdb/Dockerfile @@ -1,18 +1,16 @@ -FROM 3.8-alpine -ENV PYTHONUNBUFFERED 1 -RUN apk update && apk add bash && apk add nano && apk add mc +FROM python:3.10-slim +RUN apt-get update && apt-get install --no-install-recommends -y bash nano mc libmagic1 git + RUN mkdir /src WORKDIR /src COPY . /src/ -# install dependencies -RUN \ - apk add --no-cache python3 postgresql-libs && \ - apk add --no-cache --virtual .build-deps gcc python3-dev musl-dev postgresql-dev && \ - pip install -r requirements/prod.txt && \ - apk --purge del .build-deps +RUN pip install --upgrade pip +RUN pip install -r requirements/prod.txt + +RUN python manage.py collectstatic --settings=adex_backend.settings.dev --noinput # run gunicorn -CMD exec gunicorn atdb.wsgi_docker_sdc:application --bind 0.0.0.0:8000 --workers 4 +CMD exec gunicorn atdb.wsgi_docker_sdc:application --bind 0.0.0.0:8000 --workers 4 --timeout 120 -- GitLab