-
Notifications
You must be signed in to change notification settings - Fork 341
/
Dockerfile
44 lines (35 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM ubuntu:latest
MAINTAINER fnndsc "[email protected]"
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
RUN mkdir mly
WORKDIR /mly
RUN pip3 install pdfkit==0.6.1
RUN pip3 install grip==4.5.2
# install wkhtmltopdf
## install wget
RUN apt-get install -y wget
## install libpng12-0 (a dependency of wkhtmltopdf)
RUN wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/15108504/+files/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
RUN dpkg -i ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
RUN apt-get install -f
## install other wkhtmltopdf's dependencies
RUN apt-get install -y fontconfig \
libjpeg-turbo8 \
libssl1.0.0 \
libx11-6 \
libxcb1 \
libxext6 \
xfonts-75dpi \
xfonts-base \
libxrender1
## finally install wkhtmltox
RUN wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb
RUN dpkg -i ./wkhtmltox_0.12.5-1.xenial_amd64.deb
RUN apt-get install -f
# install ghostscript
RUN apt-get install -y ghostscript
# CMD ["bash", "create_pdf.sh"]