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-23 09:48:22 +03:00
|
|
|
|
2021-12-15 17:53:33 +03:00
|
|
|
# Copy project into dir
|
|
|
|
COPY . .
|
|
|
|
|
2021-12-23 10:20:31 +03:00
|
|
|
RUN \
|
2021-12-23 10:48:39 +03:00
|
|
|
# Build dependencies (This will pipe all packages from the file)
|
|
|
|
sed 's/#.*//' ./install/dependencies_build.txt | xargs apk add --no-cache --virtual .build-deps && \
|
|
|
|
# Runtime dependencies (Same)
|
2021-12-23 20:13:36 +03:00
|
|
|
sed 's/#.*//' ./install/dependencies_run.txt | xargs apk add --no-cache && \
|
2021-12-23 10:20:31 +03:00
|
|
|
# Python dependencies
|
|
|
|
pip3 install --no-cache-dir -r requirements.txt && \
|
|
|
|
# Local project install
|
|
|
|
pip3 install /usr/src/app && \
|
|
|
|
# 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-31 06:22:19 +03:00
|
|
|
ENV MAGICK_HOME=/usr
|
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"]
|