2020-06-06 12:53:42 +03:00
|
|
|
FROM python:3-alpine
|
2020-01-21 17:09:52 +03:00
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
# Based on the work of Jonathan Boeckel <jonathanboeckel1996@gmail.com>
|
|
|
|
# https://gitlab.com/Joniator/docker-maloja
|
|
|
|
# https://github.com/Joniator
|
|
|
|
|
2020-01-21 17:09:52 +03:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2022-03-09 23:53:42 +03:00
|
|
|
# this should change rarely, can be cached
|
|
|
|
COPY ./requirements.txt ./requirements.txt
|
|
|
|
|
|
|
|
# Install everything before copying rest of the project, can be cached
|
|
|
|
RUN \
|
|
|
|
apk add --no-cache --virtual .build-deps gcc python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers && \
|
2022-03-10 00:02:42 +03:00
|
|
|
apk add --no-cache python3 tzdata && \
|
2022-03-09 23:53:42 +03:00
|
|
|
pip3 install --no-cache-dir -r requirements.txt && \
|
|
|
|
apk del .build-deps
|
|
|
|
|
2021-12-23 09:48:22 +03:00
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
COPY . .
|
2022-03-09 23:53:42 +03:00
|
|
|
RUN pip3 install /usr/src/app
|
2021-12-15 17:53:33 +03:00
|
|
|
|
2022-03-09 23:53:42 +03:00
|
|
|
# Docker-specific configuration and default to IPv4
|
2021-12-15 17:53:33 +03:00
|
|
|
ENV MALOJA_SKIP_SETUP=yes
|
2022-02-20 07:06:38 +03:00
|
|
|
ENV MALOJA_HOST=0.0.0.0
|
2020-01-21 17:09:52 +03:00
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
EXPOSE 42010
|
|
|
|
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
|
2021-12-23 09:48:22 +03:00
|
|
|
ENTRYPOINT ["maloja", "run"]
|