Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -4,12 +4,13 @@ FROM python:3.9-slim
|
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
# Then, install all necessary
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
wget \
|
| 15 |
fontconfig \
|
|
@@ -18,12 +19,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 18 |
xfonts-75dpi \
|
| 19 |
xfonts-base \
|
| 20 |
libxrender1 \
|
| 21 |
-
# This will now succeed because we added the buster repo
|
| 22 |
libssl1.1 \
|
| 23 |
&& apt-get clean \
|
| 24 |
&& rm -rf /var/lib/apt/lists/*
|
| 25 |
|
| 26 |
-
#
|
| 27 |
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 28 |
dpkg -i wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 29 |
rm wkhtmltox_0.12.6-1.buster_amd64.deb
|
|
|
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# --- THE CORRECT FIX ---
|
| 8 |
+
# 1. The Debian 10 "Buster" repository is now on the archive server. We must point to the correct URL.
|
| 9 |
+
# 2. We add "[trusted=yes]" because archived repositories may have expired GPG keys.
|
| 10 |
+
RUN echo "deb [trusted=yes] http://archive.debian.org/debian buster main" > /etc/apt/sources.list.d/buster.list
|
| 11 |
|
| 12 |
+
# Now, update the package lists. This will successfully find the old packages on the archive server.
|
| 13 |
+
# Then, install all the necessary system libraries, which will now be found.
|
| 14 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 15 |
wget \
|
| 16 |
fontconfig \
|
|
|
|
| 19 |
xfonts-75dpi \
|
| 20 |
xfonts-base \
|
| 21 |
libxrender1 \
|
|
|
|
| 22 |
libssl1.1 \
|
| 23 |
&& apt-get clean \
|
| 24 |
&& rm -rf /var/lib/apt/lists/*
|
| 25 |
|
| 26 |
+
# With all dependencies correctly installed, download and install the wkhtmltox package.
|
| 27 |
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 28 |
dpkg -i wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 29 |
rm wkhtmltox_0.12.6-1.buster_amd64.deb
|