-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 1.01 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
FROM python:3.6.12-slim-buster
WORKDIR /usr/src
RUN mkdir oereb_server
WORKDIR /usr/src/oereb_server
COPY ./dev-requirements.txt .
COPY development.mako .
COPY run_oereb_server.py .
COPY production.mako .
COPY pyramid_oereb_standard.mako .
COPY requirements.txt .
COPY setup.py .
COPY ./oereb_server/. ./oereb_server/.
COPY ./tests/. ./tests/.
RUN apt update && \
DEV_PACKAGES="build-essential libgeos-dev" && \
DEBIAN_FRONTEND=noninteractive apt install --yes --no-install-recommends \
libgeos-c1v5 gosu tini ${DEV_PACKAGES} && \
pip install --disable-pip-version-check --no-cache-dir --requirement requirements.txt && \
apt remove --purge --autoremove --yes ${DEV_PACKAGES} binutils && \
apt-get clean && \
rm --force --recursive /var/lib/apt/lists/*
RUN python setup.py develop
RUN groupadd oereb && useradd -g oereb oerebrunner
RUN chown -R oerebrunner:oereb /usr/src/oereb_server
ENTRYPOINT [ "gosu", "oerebrunner", "tini", "--" ]
CMD ["python", "/usr/src/oereb_server/run_oereb_server.py"]