Created
January 27, 2016 22:10
-
-
Save NTICompass/614e6e40d32655c64b74 to your computer and use it in GitHub Desktop.
Run headless wkhtmltopdf inside Docker container
This file contains 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 <nticompass@gmail.com> | |
# 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