Created
December 12, 2017 15:52
-
-
Save leohemsted/750fd4214fc7258e572a134b1c4598c7 to your computer and use it in GitHub Desktop.
Dockerfile that creates a bad PDF
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
FROM python:3.6-slim-stretch | |
RUN \ | |
echo "weasyprint dependencies" \ | |
&& apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libcairo2 \ | |
libpango1.0-0 \ | |
libpangocairo-1.0.0 \ | |
libgdk-pixbuf2.0-0 \ | |
shared-mime-info | |
RUN \ | |
echo "imagemagick dependencies" \ | |
&& apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
ghostscript \ | |
imagemagick | |
RUN pip install weasyprint==0.41 | |
COPY letter.html . | |
RUN weasyprint letter.html letter.pdf | |
RUN convert -density 300 -depth 8 -quality 85 letter.pdf letter.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment