-
-
Save iuridiniz/53e18360a48c9686b0447c5d1bdceb9c to your computer and use it in GitHub Desktop.
Run headless wkhtmltopdf inside Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wkhtmltopdf from: http://wkhtmltopdf.org/downloads.html | |
FROM centos:7 | |
MAINTAINER Eric Siegel <[email protected]> | |
# Upgrade packages & repo | |
RUN yum -y update | |
# wkhtmltopdf's dependencies | |
RUN yum -y install zlib fontconfig freetype libX11 libXext libXrender | |
# Download x64 static build of wkhtmltox (with patched QT) | |
ADD http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz /tmp/wkhtmltox.tar.xz | |
# Extract the archive | |
RUN tar -C /opt -xvf /tmp/wkhtmltox.tar.xz | |
# Run wkhtmltopdf and accept command line args | |
WORKDIR /opt/wkhtmltox/bin | |
ENTRYPOINT ["./wkhtmltopdf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment