Spaces:
Running
Running
t commited on
Commit ·
fb43ab0
1
Parent(s): b50abf7
fix: switch to bullseye base to resolve wkhtmltox dependencies
Browse files- Dockerfile +21 -16
Dockerfile
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
| 2 |
|
|
|
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
git \
|
| 5 |
git-lfs \
|
|
@@ -7,23 +11,24 @@ RUN apt-get update && apt-get install -y \
|
|
| 7 |
libgl1 \
|
| 8 |
libglib2.0-0 \
|
| 9 |
wget \
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
xfonts-75dpi \
|
| 22 |
-
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb -O /tmp/wkhtmltox.deb \
|
| 23 |
-
&& apt-get install -f -y /tmp/wkhtmltox.deb \
|
| 24 |
-
&& rm -rf /tmp/wkhtmltox.deb \
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
WORKDIR /app
|
| 28 |
|
| 29 |
COPY requirements.txt .
|
|
|
|
| 1 |
+
# 1. Use 'bullseye' explicitly.
|
| 2 |
+
# The default 'slim' is now Bookworm (Debian 12), which has dropped support for the older wkhtmltopdf dependencies.
|
| 3 |
+
FROM python:3.11-slim-bullseye
|
| 4 |
|
| 5 |
+
# 2. Install dependencies
|
| 6 |
+
# We include 'xfonts-75dpi' and 'xfonts-base' which are crucial for wkhtmltopdf
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
git \
|
| 9 |
git-lfs \
|
|
|
|
| 11 |
libgl1 \
|
| 12 |
libglib2.0-0 \
|
| 13 |
wget \
|
| 14 |
+
fontconfig \
|
| 15 |
+
libfreetype6 \
|
| 16 |
+
libjpeg62-turbo \
|
| 17 |
+
libpng16-16 \
|
| 18 |
+
libx11-6 \
|
| 19 |
+
libxext6 \
|
| 20 |
+
libxrender1 \
|
| 21 |
+
libxft2 \
|
| 22 |
+
libfontconfig1 \
|
| 23 |
+
xfonts-base \
|
| 24 |
+
xfonts-75dpi \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
| 27 |
+
# 3. Download the specific package for BULLSEYE (Debian 11), not Jammy (Ubuntu)
|
| 28 |
+
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb -O /tmp/wkhtmltox.deb \
|
| 29 |
+
&& apt-get install -f -y /tmp/wkhtmltox.deb \
|
| 30 |
+
&& rm -rf /tmp/wkhtmltox.deb
|
| 31 |
+
|
| 32 |
WORKDIR /app
|
| 33 |
|
| 34 |
COPY requirements.txt .
|