summaryrefslogtreecommitdiff
path: root/ci/ciimage
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-02-16 00:14:18 -0500
committerEli Schwartz <eschwartz93@gmail.com>2024-07-24 12:14:37 -0400
commit4205c1ea23b2dc881105ef158eb5cb441380f9ee (patch)
treeae30800fb5f21d1453540446d2c27593858584a4 /ci/ciimage
parent7bd00a38f90bb24400e8cbcc510f01c95d119949 (diff)
downloadmeson-4205c1ea23b2dc881105ef158eb5cb441380f9ee.tar.gz
CI: gentoo: avoid bloating up the image with cache data
Diffstat (limited to 'ci/ciimage')
-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