Docker: Install wkhtmltopdf from vendor to enable inclusion of images (#83)

* wkhtmltopdf from vendor rather than ubuntu upstream

* removing xvfb

* fixed dependency issue for wkhtmltopdf

* Fix formatting, add --no-progress to wget command
This commit is contained in:
danielklim 2018-10-17 15:29:43 -04:00 committed by Benedikt Franke
parent 6fbb6b4f52
commit a3e2388724

View File

@ -13,15 +13,14 @@ RUN apt-get update \
&& apt-get install -qqy --no-install-recommends \ && apt-get install -qqy --no-install-recommends \
# This is for enabling the program to be run with watch # This is for enabling the program to be run with watch
procps \ procps \
wkhtmltopdf \
# Required to run PDF generation # Required to run PDF generation
xvfb \ wget apt-utils libjpeg62-turbo libxrender1 xfonts-75dpi xfonts-base fontconfig libxext6 \
xauth \ && apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Wrap pdf creation in a xvfb-run to enable headless pdf creation in the container RUN cd /root \
RUN echo "#!/bin/bash\nxvfb-run $(which wkhtmltopdf) \"\$@\"" >> /usr/local/bin/wkhtmltopdf \ && wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb --no-verbose \
&& chmod +x /usr/local/bin/wkhtmltopdf && dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb
# Enables continously calling a command and piping the output to STDOUT, viewable via docker logs # Enables continously calling a command and piping the output to STDOUT, viewable via docker logs
RUN printf '#!/bin/bash\nwhile sleep 1; do\n "$@"\ndone' >> /usr/bin/watch-docker \ RUN printf '#!/bin/bash\nwhile sleep 1; do\n "$@"\ndone' >> /usr/bin/watch-docker \