-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 827 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 827 Bytes
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
FROM python:3.6
MAINTAINER neargle <nearg1e.com@gmail.com>
RUN set -x \
&& apt-get update \
&& apt-get install -y wget \
&& pip install --upgrade pip \
&& pip install flask Pillow
# local
ARG GS_URL=ghostscript-9.21-linux-x86_64.tgz
ADD $GS_URL /tmp/
RUN mkdir -p /opt/ghostscript \
&& mv /tmp/ghostscript-9.21-linux-x86_64/gs-921-linux-x86_64 /usr/local/bin/gs
# remote
# ARG GS_URL=https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921/ghostscript-9.21-linux-x86_64.tgz
# ADD $GS_URL /tmp/gs.tgz
# RUN mkdir -p /opt/ghostscript \
# && tar zxf /tmp/gs.tgz -C /opt/ghostscript --strip-components=1 \
# && mv /opt/ghostscript/gs-921-linux-x86_64 /usr/local/bin/gs
ARG PY_SRC=src/
ADD $PY_SRC /tmp/src
WORKDIR /tmp/src
EXPOSE 8080
CMD [ "sh", "-c", "python app.py" ]