broadfield-dev commited on
Commit
c6f9d3d
·
verified ·
1 Parent(s): fb2ad16

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # CRITICAL FIX: The wkhtmltox package requires libssl1.1, which is not in the new Debian repos.
8
- # We must manually add the repository for the older Debian "Buster" release to find this package.
9
- RUN echo "deb http://deb.debian.org/debian buster main" >> /etc/apt/sources.list
 
10
 
11
- # Update the package lists to include the newly added "Buster" repository.
12
- # Then, install all necessary dependencies. apt will now be able to find libssl1.1.
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
- # Now that all dependencies are present, 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
 
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