diff --git a/Dockerfile b/Dockerfile index bdf094e0..8f9babc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,17 @@ FROM python:3.10-slim-bullseye AS backend-build RUN apt-get update && apt-get install -y --no-install-recommends \ + pkg-config \ + build-essential \ + git \ libpq-dev \ && rm -rf /var/lib/apt/lists/* + WORKDIR /app COPY ./requirements /app/requirements -RUN pip install pip 'setuptools<59.0' -U +RUN pip install pip --upgrade RUN pip install -r requirements/production.txt @@ -29,15 +33,16 @@ RUN npm run build # Stage 3 - Build docker image suitable for execution and deployment -FROM python:3.10-buster AS production +FROM python:3.10-slim-bullseye AS production # Stage 3.1 - Set up the needed production dependencies # install all the dependencies for GeoDjango RUN apt-get update && apt-get install -y --no-install-recommends \ postgresql-client \ - libgdal20 \ - libgeos-c1v5 \ - libproj13 \ + binutils \ + libproj-dev \ + gdal-bin \ + libgdal30 \ && rm -rf /var/lib/apt/lists/* COPY --from=backend-build /usr/local/lib/python3.10 /usr/local/lib/python3.10 diff --git a/requirements/base.txt b/requirements/base.txt index 3a1d66d3..feaa7bd3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -20,7 +20,7 @@ certifi==2020.12.5 # elastic-apm # requests # sentry-sdk -cffi==1.14.6 +cffi==1.16.0 # via cryptography chardet==4.0.0 # via requests diff --git a/requirements/ci.txt b/requirements/ci.txt index 8085aa14..0f320a93 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -27,7 +27,7 @@ certifi==2020.12.5 # elastic-apm # requests # sentry-sdk -cffi==1.14.6 +cffi==1.16.0 # via # -r requirements/base.txt # cryptography diff --git a/requirements/dev.txt b/requirements/dev.txt index c1531f93..1f2e664a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -41,7 +41,7 @@ certifi==2020.12.5 # elastic-apm # requests # sentry-sdk -cffi==1.14.6 +cffi==1.16.0 # via # -r requirements/ci.txt # cryptography