Skip to content

Commit f141e7a

Browse files
committed
Update Dockerfile to install required build tools
For some reason uwsgi doens't ship with wheels
1 parent ca897e4 commit f141e7a

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Dockerfile

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
FROM python:3.10-slim-bullseye AS backend-build
33

44
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
pkg-config \
6+
build-essential \
7+
git \
58
libpq-dev \
69
&& rm -rf /var/lib/apt/lists/*
710

11+
812
WORKDIR /app
913

1014
COPY ./requirements /app/requirements
11-
RUN pip install pip 'setuptools<59.0' -U
15+
RUN pip install pip --upgrade
1216
RUN pip install -r requirements/production.txt
1317

1418

@@ -29,15 +33,16 @@ RUN npm run build
2933

3034

3135
# Stage 3 - Build docker image suitable for execution and deployment
32-
FROM python:3.10-buster AS production
36+
FROM python:3.10-slim-bullseye AS production
3337

3438
# Stage 3.1 - Set up the needed production dependencies
3539
# install all the dependencies for GeoDjango
3640
RUN apt-get update && apt-get install -y --no-install-recommends \
3741
postgresql-client \
38-
libgdal20 \
39-
libgeos-c1v5 \
40-
libproj13 \
42+
binutils \
43+
libproj-dev \
44+
gdal-bin \
45+
libgdal-dev \
4146
&& rm -rf /var/lib/apt/lists/*
4247

4348
COPY --from=backend-build /usr/local/lib/python3.10 /usr/local/lib/python3.10

requirements/base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ certifi==2020.12.5
2020
# elastic-apm
2121
# requests
2222
# sentry-sdk
23-
cffi==1.14.6
23+
cffi==1.16.0
2424
# via cryptography
2525
chardet==4.0.0
2626
# via requests

requirements/ci.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ certifi==2020.12.5
2727
# elastic-apm
2828
# requests
2929
# sentry-sdk
30-
cffi==1.14.6
30+
cffi==1.16.0
3131
# via
3232
# -r requirements/base.txt
3333
# cryptography

requirements/dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ certifi==2020.12.5
4141
# elastic-apm
4242
# requests
4343
# sentry-sdk
44-
cffi==1.14.6
44+
cffi==1.16.0
4545
# via
4646
# -r requirements/ci.txt
4747
# cryptography

0 commit comments

Comments
 (0)