broadfield-dev commited on
Commit
574a255
·
verified ·
1 Parent(s): 64da299

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -4
Dockerfile CHANGED
@@ -1,13 +1,25 @@
1
  FROM python:3.10-slim
2
 
3
- # Install wkhtmltopdf and dependencies for networking and fonts
4
- RUN apt-get update && apt-get install -y \
5
- wkhtmltopdf \
6
  ca-certificates \
7
  fontconfig \
8
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  WORKDIR /app
 
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
  COPY . .
 
1
  FROM python:3.10-slim
2
 
3
+ # Set version for wkhtmltopdf and install dependencies, including wget
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ wget \
6
  ca-certificates \
7
  fontconfig \
8
+ libxrender1 \
9
+ libxext6 \
10
+ xfonts-75dpi \
11
+ xfonts-base && \
12
+ rm -rf /var/lib/apt/lists/*
13
+
14
+ # Download and install the wkhtmltopdf package directly
15
+ RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.buster_amd64.deb && \
16
+ apt-get update && \
17
+ apt-get install -y --no-install-recommends ./wkhtmltox_0.12.6.1-2.buster_amd64.deb && \
18
+ rm ./wkhtmltox_0.12.6.1-2.buster_amd64.deb && \
19
+ rm -rf /var/lib/apt/lists/*
20
 
21
  WORKDIR /app
22
+
23
  COPY requirements.txt .
24
  RUN pip install --no-cache-dir -r requirements.txt
25
  COPY . .