forked from opendata-stuttgart/feinstaub-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 677 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (28 loc) · 677 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
33
34
35
36
37
FROM python:3.6
MAINTAINER Opendata Stuttgart
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
lib32z1-dev \
libmemcached-dev \
locales \
postgresql-client \
postgresql-server-dev-all \
sudo \
ttf-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
RUN useradd uid1000 -d /home/uid1000 \
&& mkdir -p /home/uid1000 \
&& chown uid1000: /home/uid1000
VOLUME /home/uid1000
EXPOSE 8000
USER root
ADD requirements.txt /opt/code/requirements.txt
WORKDIR /opt/code
RUN pip3 install -Ur requirements.txt
ADD . /opt/code
RUN chown -R uid1000: /opt
WORKDIR /opt/code/feinstaub
USER uid1000
# production stuff
ENTRYPOINT ["./start.sh"]
CMD ["web"]