broadfield-dev commited on
Commit
37aaf51
·
verified ·
1 Parent(s): 53c9dee

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -4,21 +4,23 @@ FROM python:3.9-slim
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Update package lists and install necessary dependencies for wkhtmltopdf
8
- # These include fonts and rendering libraries
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  wget \
 
 
 
 
11
  xfonts-75dpi \
12
  xfonts-base \
13
  libxrender1 \
14
  && apt-get clean \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Download the specific version of wkhtmltopdf that is known to work
18
  RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
19
- # Install the package using dpkg
20
  dpkg -i wkhtmltox_0.12.6-1.buster_amd64.deb && \
21
- # Clean up the downloaded file
22
  rm wkhtmltox_0.12.6-1.buster_amd64.deb
23
 
24
  # Copy your application files into the container
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Update package lists and install ALL necessary system dependencies for wkhtmltopdf
8
+ # This now includes the ones that caused the previous error, resolving the dpkg failure.
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  wget \
11
+ fontconfig \
12
+ libjpeg62-turbo \
13
+ libssl1.1 \
14
+ libxext6 \
15
  xfonts-75dpi \
16
  xfonts-base \
17
  libxrender1 \
18
  && apt-get clean \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
+ # Now, download and install the package. It will succeed because its dependencies are present.
22
  RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
 
23
  dpkg -i wkhtmltox_0.12.6-1.buster_amd64.deb && \
 
24
  rm wkhtmltox_0.12.6-1.buster_amd64.deb
25
 
26
  # Copy your application files into the container