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
|
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
# Copy project into dir
|
|
|
|
COPY . .
|
|
|
|
|
2020-06-06 12:53:42 +03:00
|
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
|
|
gcc \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
libc-dev \
|
2021-12-15 17:53:33 +03:00
|
|
|
# install pip3
|
|
|
|
py3-pip \
|
|
|
|
linux-headers && \
|
2020-06-06 12:53:42 +03:00
|
|
|
pip3 install psutil && \
|
2021-12-15 17:53:33 +03:00
|
|
|
# use pip to install maloja project requirements
|
|
|
|
pip3 install --no-cache-dir -r requirements.txt && \
|
|
|
|
# use pip to install maloja as local project
|
|
|
|
pip3 install /usr/src/app && \
|
2020-06-06 12:53:42 +03:00
|
|
|
apk del .build-deps
|
2020-01-21 17:09:52 +03:00
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
|
|
|
|
# expected behavior for a default setup is for maloja to "just work"
|
|
|
|
ENV MALOJA_SKIP_SETUP=yes
|
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
|
|
|
|
ENTRYPOINT ["maloja", "run"]
|