From 6798500398b12a84aeeee9978d1a9de20a5d86cf Mon Sep 17 00:00:00 2001 From: krateng Date: Thu, 23 Dec 2021 07:48:22 +0100 Subject: [PATCH] Made dockerfiles use authorative information on packages --- Dockerfile | 30 ++++++++++++++---------------- Dockerfile-pypi | 30 ++++++++++++++++-------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index c11f404..e4768c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +ENTRYPOINT ["maloja", "run"] diff --git a/Dockerfile-pypi b/Dockerfile-pypi index a348d3f..3e2ebbb 100644 --- a/Dockerfile-pypi +++ b/Dockerfile-pypi @@ -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"]