1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00
maloja/Containerfile

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-03-10 09:11:39 +03:00
FROM alpine:3.15
# Python image includes two Python versions, so use base Alpine
2020-01-21 17:09:52 +03:00
# Based on the work of Jonathan Boeckel <jonathanboeckel1996@gmail.com>
2020-01-21 17:09:52 +03:00
WORKDIR /usr/src/app
2022-03-10 09:11:39 +03:00
# Install run dependencies first
RUN apk add --no-cache python3 tzdata
# system pip could be removed after build, but apk then decides to also remove all its
# python dependencies, even if they are explicitly installed as python packages
# whut
RUN \
apk add py3-pip && \
pip install wheel
2022-04-08 18:23:56 +03:00
# these are more static than the real requirements, which means caching
COPY ./requirements_pre.txt ./requirements_pre.txt
RUN \
apk add --no-cache --virtual .build-deps gcc g++ python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers && \
pip install --no-cache-dir -r requirements_pre.txt && \
apk del .build-deps
# less likely to be cached
2022-03-09 23:53:42 +03:00
COPY ./requirements.txt ./requirements.txt
RUN \
2022-03-10 09:11:39 +03:00
apk add --no-cache --virtual .build-deps gcc g++ python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers && \
pip install --no-cache-dir -r requirements.txt && \
2022-03-09 23:53:42 +03:00
apk del .build-deps
2022-03-10 09:11:39 +03:00
# no chance for caching below here
COPY . .
2022-03-10 09:11:39 +03:00
RUN pip install /usr/src/app
2022-03-09 23:53:42 +03:00
# Docker-specific configuration and default to IPv4
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
ENV PYTHONUNBUFFERED=1
EXPOSE 42010
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
ENTRYPOINT ["maloja", "run"]