From 3a4d7afcf01c7060fb6b457f5c646002359cb9b6 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 25 May 2024 14:15:13 +0200 Subject: [PATCH] Clean up all package manager caches after Docker build. --- platypush/install/docker/alpine.Dockerfile | 4 +++- platypush/install/docker/debian.Dockerfile | 2 ++ platypush/install/docker/fedora.Dockerfile | 4 +++- platypush/install/docker/ubuntu.Dockerfile | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/platypush/install/docker/alpine.Dockerfile b/platypush/install/docker/alpine.Dockerfile index b522f15cc..ae04336f4 100644 --- a/platypush/install/docker/alpine.Dockerfile +++ b/platypush/install/docker/alpine.Dockerfile @@ -22,7 +22,9 @@ RUN /install/platypush/install/scripts/alpine/install.sh && \ rm -rf /install && \ rm -rf /root/.cache/pip && \ find / | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && \ - apk cache clean + apk del gcc git && \ + apk cache clean && \ + rm -rf /var/cache/apk/* EXPOSE 8008 diff --git a/platypush/install/docker/debian.Dockerfile b/platypush/install/docker/debian.Dockerfile index 5e4234375..b66884795 100644 --- a/platypush/install/docker/debian.Dockerfile +++ b/platypush/install/docker/debian.Dockerfile @@ -25,6 +25,8 @@ RUN /install/platypush/install/scripts/debian/install.sh && \ rm -rf /install && \ rm -rf /root/.cache/pip && \ find / | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && \ + apt remove -y git build-essential && \ + rm -rf /var/lib/apt/lists/* && \ apt autoclean -y && \ apt autoremove -y && \ apt clean diff --git a/platypush/install/docker/fedora.Dockerfile b/platypush/install/docker/fedora.Dockerfile index ebf34a8d3..d729c9c79 100644 --- a/platypush/install/docker/fedora.Dockerfile +++ b/platypush/install/docker/fedora.Dockerfile @@ -24,7 +24,9 @@ RUN dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-re rm -rf /install && \ rm -rf /root/.cache/pip && \ find / | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && \ - dnf clean all -y + dnf remove -y build-essential git && \ + dnf clean all -y && \ + rm -rf /var/cache/dnf/* EXPOSE 8008 diff --git a/platypush/install/docker/ubuntu.Dockerfile b/platypush/install/docker/ubuntu.Dockerfile index 2e5d682f6..ccb98c42b 100644 --- a/platypush/install/docker/ubuntu.Dockerfile +++ b/platypush/install/docker/ubuntu.Dockerfile @@ -25,6 +25,8 @@ RUN /install/platypush/install/scripts/debian/install.sh && \ rm -rf /install && \ rm -rf /root/.cache/pip && \ find / | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && \ + apt remove -y git build-essential && \ + rm -rf /var/lib/apt/lists/* && \ apt autoclean -y && \ apt autoremove -y && \ apt clean