summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci/ciimage/gentoo/install.sh8
1 files changed, 8 insertions, 0 deletions
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