From 0f40ebbad90b92b2d6254f369a0b99e972ded167 Mon Sep 17 00:00:00 2001 From: krateng Date: Thu, 23 Dec 2021 08:20:31 +0100 Subject: [PATCH] Made Dockerfile installations one layer again --- Dockerfile | 24 +++++++++++------------- Dockerfile-pypi | 24 +++++++++++------------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index e4768c2..5039499 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,19 +10,17 @@ WORKDIR /usr/src/app # Copy project into dir COPY . . -# 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 /usr/src/app - -RUN apk del .build-deps +RUN \ + # Build dependencies + sh ./install/alpine_requirements_build_volatile.sh && \ + # Runtime dependencies + sh ./install/alpine_requirements_run.sh && \ + # 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 # expected behavior for a default setup is for maloja to "just work" ENV MALOJA_SKIP_SETUP=yes diff --git a/Dockerfile-pypi b/Dockerfile-pypi index 3e2ebbb..fee30c3 100644 --- a/Dockerfile-pypi +++ b/Dockerfile-pypi @@ -10,19 +10,17 @@ WORKDIR /usr/src/app -# 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 +RUN \ + # Build dependencies + sh ./install/alpine_requirements_build_volatile.sh && \ + # Runtime dependencies + sh ./install/alpine_requirements_run.sh && \ + # Python dependencies + pip3 install --no-cache-dir -r requirements.txt && \ + # PyPI install + pip3 install malojaserver==$MALOJA_RELEASE && \ + # Remove build dependencies + apk del .build-deps # expected behavior for a default setup is for maloja to "just work" ENV MALOJA_SKIP_SETUP=yes