From 3598253558d38524f1926f061d3504e3440cb38c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 15 Jan 2024 21:54:22 +0100 Subject: [PATCH] Reduced Docker images to a single layer. --- platypush/install/docker/alpine.Dockerfile | 10 +++++----- platypush/install/docker/debian.Dockerfile | 14 +++++++------- platypush/install/docker/fedora.Dockerfile | 12 +++++------- platypush/install/docker/ubuntu.Dockerfile | 14 +++++++------- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/platypush/install/docker/alpine.Dockerfile b/platypush/install/docker/alpine.Dockerfile index 6df50a132..30aa9d013 100644 --- a/platypush/install/docker/alpine.Dockerfile +++ b/platypush/install/docker/alpine.Dockerfile @@ -6,11 +6,11 @@ WORKDIR /var/lib/platypush ARG DOCKER_CTX=1 ENV DOCKER_CTX=1 -RUN apk update -RUN /install/platypush/install/scripts/alpine/install.sh -RUN cd /install && pip install -U --no-input --no-cache-dir . -RUN rm -rf /install -RUN rm -rf /var/cache/apk +RUN apk update && \ + /install/platypush/install/scripts/alpine/install.sh && \ + cd /install && pip install -U --no-input --no-cache-dir . && \ + rm -rf /install && \ + apk cache clean EXPOSE 8008 diff --git a/platypush/install/docker/debian.Dockerfile b/platypush/install/docker/debian.Dockerfile index 871ec4ab1..80053c771 100644 --- a/platypush/install/docker/debian.Dockerfile +++ b/platypush/install/docker/debian.Dockerfile @@ -8,13 +8,13 @@ ENV DEBIAN_FRONTEND=noninteractive ARG DOCKER_CTX=1 ENV DOCKER_CTX=1 -RUN apt update -RUN /install/platypush/install/scripts/debian/install.sh -RUN cd /install && pip install -U --no-input --no-cache-dir . --break-system-packages -RUN rm -rf /install -RUN apt autoclean -y -RUN apt autoremove -y -RUN apt clean +RUN apt update && \ + /install/platypush/install/scripts/debian/install.sh && \ + cd /install && pip install -U --no-input --no-cache-dir . --break-system-packages && \ + rm -rf /install && \ + apt autoclean -y && \ + apt autoremove -y && \ + apt clean EXPOSE 8008 diff --git a/platypush/install/docker/fedora.Dockerfile b/platypush/install/docker/fedora.Dockerfile index 98be6fb02..fd3b147ca 100644 --- a/platypush/install/docker/fedora.Dockerfile +++ b/platypush/install/docker/fedora.Dockerfile @@ -7,13 +7,11 @@ ARG DOCKER_CTX=1 ENV DOCKER_CTX=1 # Enable the RPM Fusion repository -RUN dnf install -y \ - https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm - -RUN /install/platypush/install/scripts/fedora/install.sh -RUN cd /install && pip install -U --no-input --no-cache-dir . -RUN rm -rf /install -RUN dnf clean all -y +RUN dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm && \ + /install/platypush/install/scripts/fedora/install.sh && \ + cd /install && pip install -U --no-input --no-cache-dir . && \ + rm -rf /install && \ + dnf clean all -y EXPOSE 8008 diff --git a/platypush/install/docker/ubuntu.Dockerfile b/platypush/install/docker/ubuntu.Dockerfile index cacd7b3e7..643f94dc3 100644 --- a/platypush/install/docker/ubuntu.Dockerfile +++ b/platypush/install/docker/ubuntu.Dockerfile @@ -8,13 +8,13 @@ ENV DEBIAN_FRONTEND=noninteractive ARG DOCKER_CTX=1 ENV DOCKER_CTX=1 -RUN apt update -RUN /install/platypush/install/scripts/debian/install.sh -RUN cd /install && pip install -U --no-input --no-cache-dir . -RUN rm -rf /install -RUN apt autoclean -y -RUN apt autoremove -y -RUN apt clean +RUN apt update && \ + /install/platypush/install/scripts/debian/install.sh && \ + cd /install && pip install -U --no-input --no-cache-dir . && \ + rm -rf /install && \ + apt autoclean -y && \ + apt autoremove -y && \ + apt clean EXPOSE 8008