Add architecture detection for WKHTMLtoX installation
If Apple silicon version of Docker Desktop is installed then some containers will be for arm64 architecture instead of amd64. So when installing WKHTMLtoX a proper package has to be installed.
This commit is contained in:
parent
4b81ddf797
commit
37377b07f0
|
@ -1442,7 +1442,8 @@ USER root
|
|||
ARG INSTALL_WKHTMLTOPDF=false
|
||||
|
||||
RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
|
||||
apt-get install -y \
|
||||
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
|
||||
&& apt-get install -y \
|
||||
libxrender1 \
|
||||
libfontconfig1 \
|
||||
libx11-dev \
|
||||
|
@ -1453,8 +1454,8 @@ RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
|
|||
xfonts-base \
|
||||
xfonts-75dpi \
|
||||
wget \
|
||||
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb \
|
||||
&& dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb \
|
||||
&& wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_${ARCH}.deb" \
|
||||
&& dpkg -i "wkhtmltox_0.12.6-1.bionic_${ARCH}.deb" \
|
||||
&& apt -f install \
|
||||
;fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue