-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
50 lines (41 loc) · 1.03 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
45
46
47
48
49
50
#
# EMLRender Dockerfile
#
# Author: Xavier Mertens <xavier@rootshell.be>
# Copyright: GPLv3 (http://gplv3.fsf.org)
# Fell free to use the code, but please share the changes you've made
#
FROM ubuntu:16.04
MAINTAINER Xavier Mertens <xavier@rootshell.be>
USER root
RUN apt-get update && apt-get install -y \
wget python3-pip \
xvfb xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic \
libssl-dev \
flashplugin-nonfree
#
# Install precompiled wkhtmltoimage
#
WORKDIR /opt
RUN wget -O - --quiet https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | xz -d - | tar xvf -
RUN cp wkhtmltox/bin/wkhtmltoimage /usr/local/bin
#
# Install imgkit library
#
RUN pip3 install imgkit
#
# Install PIL library
#
RUN pip3 install pillow
#
# Install flask
#
WORKDIR /tmp
COPY requirements.txt .
RUN pip3 install -r /tmp/requirements.txt
RUN rm /tmp/requirements.txt&
RUN mkdir /opt/emlrender
WORKDIR /opt/emlrender
COPY api.py .
EXPOSE 443
ENTRYPOINT [ "/opt/emlrender/api.py" ]