Made dockerfiles use authorative information on packages

This commit is contained in:
krateng 2021-12-23 07:48:22 +01:00
parent 0d2599fb82
commit 6798500398
2 changed files with 30 additions and 30 deletions

View File

@ -6,29 +6,27 @@ FROM python:3-alpine
WORKDIR /usr/src/app
# Copy project into dir
COPY . .
RUN apk add --no-cache --virtual .build-deps \
gcc \
libxml2-dev \
libxslt-dev \
libc-dev \
# install pip3
py3-pip \
linux-headers && \
pip3 install psutil && \
# 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 && \
apk del .build-deps
# Build dependencies
RUN sh ./install/alpine_requirements_build_volatile.sh
RUN apk add --no-cache tzdata
# Runtime dependencies
RUN sh ./install/alpine_requirements_run.sh
# Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Local project install
RUN pip3 install /usr/src/app
RUN apk del .build-deps
# expected behavior for a default setup is for maloja to "just work"
ENV MALOJA_SKIP_SETUP=yes
EXPOSE 42010
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
ENTRYPOINT ["maloja", "run"]
ENTRYPOINT ["maloja", "run"]

View File

@ -5,26 +5,28 @@ FROM python:3-alpine
# https://github.com/Joniator
ARG MALOJA_RELEASE
WORKDIR /usr/src/app
RUN apk add --no-cache --virtual .build-deps \
gcc \
libxml2-dev \
libxslt-dev \
py3-pip \
libc-dev \
linux-headers \
&& \
pip3 install psutil && \
pip3 install malojaserver==$MALOJA_RELEASE && \
apk del .build-deps
RUN apk add --no-cache tzdata
EXPOSE 42010
# Build dependencies
RUN sh ./install/alpine_requirements_build_volatile.sh
# Runtime dependencies
RUN sh ./install/alpine_requirements_run.sh
# Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Local project install
RUN pip3 install malojaserver==$MALOJA_RELEASE
RUN apk del .build-deps
# expected behavior for a default setup is for maloja to "just work"
ENV MALOJA_SKIP_SETUP=yes
EXPOSE 42010
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
ENTRYPOINT ["maloja", "run"]