Skip to content

Instantly share code, notes, and snippets.

@iuridiniz
Forked from NTICompass/Dockerfile
Created September 13, 2016 19:48
Show Gist options
  • Save iuridiniz/53e18360a48c9686b0447c5d1bdceb9c to your computer and use it in GitHub Desktop.
Save iuridiniz/53e18360a48c9686b0447c5d1bdceb9c to your computer and use it in GitHub Desktop.
Run headless wkhtmltopdf inside Docker container
# 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