-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
38 lines (30 loc) · 1.04 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
FROM docker.io/python:3.9.7-buster
MAINTAINER Computer Science House <[email protected]>
ENV IMAGEIO_USERDIR /var/lib/gallery
RUN apt-get update && \
apt-get install -y libldap-dev libsasl2-dev libmagic-dev ghostscript && \
apt-get autoremove --yes && \
apt-get clean autoclean && \
sed -i \
's/rights="none" pattern="PDF"/rights="read | write" pattern="PDF"/' \
/etc/ImageMagick-6/policy.xml && \
rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
mkdir -p /opt/gallery /var/lib/gallery
RUN pip install --upgrade pip
WORKDIR /opt/gallery
ADD . /opt/gallery
RUN pip install \
--no-warn-script-location \
--no-cache-dir \
-r requirements.txt
RUN groupadd -r gallery && \
useradd -l -r -u 1001 -d /var/lib/gallery -g gallery gallery && \
chown -R gallery:gallery /opt/gallery /var/lib/gallery && \
chmod -R og+rwx /var/lib/gallery
USER gallery
CMD ddtrace-run gunicorn "wsgi:app" \
--workers 4 \
--timeout 600 \
--capture-output \
--bind=0.0.0.0:8080 \
--access-logfile=-