-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
28 lines (18 loc) · 1023 Bytes
/
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
FROM ubuntu:14.04
RUN sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list
RUN apt-get update -qq && \
apt-get install -yqq fonts-wqy-zenhei fonts-thai-tlwg fontconfig libfontconfig1 libfreetype6 libjpeg-turbo8 libx11-6 libxext6 libxrender1 wget xvfb python3 python3-pip xfonts-75dpi flashplugin-installer && \
apt-get -yqq clean
RUN wget -O wkhtmltox.tar.xz https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz && \
tar xf wkhtmltox.tar.xz && \
mv wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
ADD wkhtmltopdf.sh /usr/bin/wkhtmltopdf.sh
RUN useradd printer_service
ADD requirements.txt /app/requirements.txt
ADD run.py /app/run.py
ADD app.py /app/app.py
RUN pip3 install -r /app/requirements.txt
EXPOSE 8080
USER printer_service
ENTRYPOINT ["python3"]
CMD ["/app/run.py"]