Skip to content

Commit f254d7b

Browse files
authored
Fix Docker build error by adding Cairo dependencies (#330)
The workshop service Docker build was failing when trying to install pycairo because the Cairo graphics library was missing from the Alpine Linux base image. Changes: - Added cairo-dev and pkgconfig to build stage dependencies (needed to compile pycairo from source) - Added cairo to runtime stage dependencies (needed for pycairo to run) This resolves the meson build error: "Dependency 'cairo' not found"
1 parent 8f1be71 commit f254d7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/workshop/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ RUN apk add --update --no-cache --virtual .build-deps \
2424
libffi-dev gcc py3-pip \
2525
python3-dev \
2626
musl-dev \
27-
libffi-dev
27+
libffi-dev \
28+
cairo-dev \
29+
pkgconfig
2830

2931
ENV PYTHONDONTWRITEBYTECODE=1
3032
ENV PYTHONUNBUFFERED=1
@@ -36,7 +38,7 @@ RUN pip install wheel && pip wheel . --wheel-dir /app/wheels
3638
FROM python:3.11-alpine
3739
COPY --from=build /app /app
3840
WORKDIR /app
39-
RUN apk update && apk add --no-cache postgresql-libs curl
41+
RUN apk update && apk add --no-cache postgresql-libs curl cairo
4042
RUN pip install --no-index --find-links=/app/wheels -r requirements.txt
4143
COPY ./certs /app/certs
4244
COPY health.sh /app/health.sh

0 commit comments

Comments
 (0)