[Docker] Add Dockerfile

This commit is contained in:
Killian Kemps
2020-04-28 17:12:51 +02:00
parent 9e0ec5ff0f
commit e86bd1562d
3 changed files with 106 additions and 0 deletions

35
docker/Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
FROM python:3.7-slim-buster
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
make \
&& apt-get clean
COPY Makefile /opt/snikket-web-portal/Makefile
COPY requirements.txt /opt/snikket-web-portal/requirements.txt
COPY build-requirements.txt /opt/snikket-web-portal/build-requirements.txt
COPY snikket_web/ /opt/snikket-web-portal/snikket_web
COPY babel.cfg /opt/snikket-web-portal/babel.cfg
COPY web_config.production.py /opt/snikket-web-portal/.local/web_config.py
WORKDIR /opt/snikket-web-portal
RUN pip install -r requirements.txt \
&& pip install -r build-requirements.txt
RUN make
ENV SNIKKET_WEB_CONFIG "/opt/snikket-web-portal/.local/web_config.py"
RUN pip install hypercorn
ADD docker/entrypoint.sh /bin/entrypoint.sh
ENTRYPOINT ["/bin/sh", "/bin/entrypoint.sh"]