Skip to content

Commit

Permalink
Update Dockerfile to install required build tools
Browse files Browse the repository at this point in the history
For some reason uwsgi doens't ship with wheels
  • Loading branch information
Viicos committed Jan 19, 2024
1 parent ca897e4 commit a5158f1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5158f1

Please sign in to comment.