2021-12-15 17:53:33 +03:00
|
|
|
FROM python:3-alpine
|
|
|
|
|
|
|
|
# Based on the work of Jonathan Boeckel <jonathanboeckel1996@gmail.com>
|
|
|
|
# https://gitlab.com/Joniator/docker-maloja
|
|
|
|
# https://github.com/Joniator
|
|
|
|
|
|
|
|
ARG MALOJA_RELEASE
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2021-12-23 10:24:12 +03:00
|
|
|
# Copy needed information
|
|
|
|
COPY ./install ./install
|
2021-12-23 09:48:22 +03:00
|
|
|
|
2021-12-23 10:20:31 +03:00
|
|
|
RUN \
|
|
|
|
# Build dependencies
|
|
|
|
sh ./install/alpine_requirements_build_volatile.sh && \
|
|
|
|
# Runtime dependencies
|
|
|
|
sh ./install/alpine_requirements_run.sh && \
|
2021-12-23 10:24:12 +03:00
|
|
|
|
|
|
|
|
|
|
|
# PyPI install
|
|
|
|
pip3 install malojaserver==$MALOJA_RELEASE && \
|
2021-12-23 10:20:31 +03:00
|
|
|
# Remove build dependencies
|
|
|
|
apk del .build-deps
|
2021-12-15 17:53:33 +03:00
|
|
|
|
|
|
|
# expected behavior for a default setup is for maloja to "just work"
|
|
|
|
ENV MALOJA_SKIP_SETUP=yes
|
|
|
|
|
2021-12-23 09:48:22 +03:00
|
|
|
EXPOSE 42010
|
|
|
|
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
|
2021-12-15 17:53:33 +03:00
|
|
|
ENTRYPOINT ["maloja", "run"]
|