From 4205c1ea23b2dc881105ef158eb5cb441380f9ee Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Fri, 16 Feb 2024 00:14:18 -0500 Subject: [PATCH] CI: gentoo: avoid bloating up the image with cache data --- ci/ciimage/gentoo/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/ciimage/gentoo/install.sh b/ci/ciimage/gentoo/install.sh index 8f7aa33f5..5a8f68070 100755 --- a/ci/ciimage/gentoo/install.sh +++ b/ci/ciimage/gentoo/install.sh @@ -158,3 +158,11 @@ install_python_packages python3 -m pip install "${base_python_pkgs[@]}" echo "source /etc/profile" >> /ci/env_vars.sh + +# Cleanup to avoid including large contents in the docker image. +# We don't need cache files that are side artifacts of installing packages. +# We also don't need the gentoo tree -- the official docker image doesn't +# either, and expects you to use emerge-webrsync once you need it. +rm -rf /var/cache/binpkgs +rm -rf /var/cache/distfiles +rm -rf /var/db/repos/gentoo