broadfield-dev commited on
Commit
28dce47
·
verified ·
1 Parent(s): a22bbc3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,9 +1,9 @@
1
  FROM python:3.10-slim
2
 
3
- # Set the DEBIAN_FRONTEND to noninteractive to avoid warnings during apt-get install
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # 1. Install base dependencies, now including xauth for xvfb.
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  wget \
9
  ca-certificates \
@@ -12,18 +12,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  libxrender1 \
13
  xfonts-75dpi \
14
  xfonts-base \
15
- xvfb \
16
- xauth \
17
- && rm -rf /var-lib/apt/lists/*
18
 
19
- # 2. Download and install the legacy dependencies using the correct, verified URLs.
 
 
 
20
  RUN set -ex; \
21
  wget http://archive.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.2-2+deb10u1_amd64.deb && \
22
  wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb && \
23
  apt-get install -y ./*.deb && \
24
  rm ./*.deb
25
 
26
- # 3. With all dependencies satisfied, download and install wkhtmltox.
27
  RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
28
  apt-get install -y --no-install-recommends ./wkhtmltox_0.12.6-1.buster_amd64.deb && \
29
  rm ./wkhtmltox_0.12.6-1.buster_amd64.deb && \
 
1
  FROM python:3.10-slim
2
 
3
+ # Set the DEBIAN_FRONTEND to noninteractive
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # 1. Install the base dependencies that we know are required.
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  wget \
9
  ca-certificates \
 
12
  libxrender1 \
13
  xfonts-75dpi \
14
  xfonts-base \
15
+ && rm -rf /var/lib/apt/lists/*
 
 
16
 
17
+ # 2. As requested, create a writable font cache directory.
18
+ RUN mkdir -p /var/cache/fontconfig && chmod 777 /var/cache/fontconfig
19
+
20
+ # 3. Download and install the legacy dependencies.
21
  RUN set -ex; \
22
  wget http://archive.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.2-2+deb10u1_amd64.deb && \
23
  wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb && \
24
  apt-get install -y ./*.deb && \
25
  rm ./*.deb
26
 
27
+ # 4. With all dependencies satisfied, download and install wkhtmltox.
28
  RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
29
  apt-get install -y --no-install-recommends ./wkhtmltox_0.12.6-1.buster_amd64.deb && \
30
  rm ./wkhtmltox_0.12.6-1.buster_amd64.deb && \