From 96c3e9e9836de5ece3efaf1a2d24cb66756a75ff Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 27 Jul 2018 16:47:09 +0530 Subject: [PATCH] clean up the $HOME/.cache directory after installation Yarn stores every package in a global cache in your user directory on the file system. This ends up to be around ~400M of extra utilized by the image and has no benefits whatsoever. Additionally `go` populates a build cache with will also be cleared when the ~/.cache directory is purged /cc @solidnerd --- assets/build/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/build/install.sh b/assets/build/install.sh index 6b4b9c2d..2c91560d 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -386,3 +386,6 @@ EOF # purge build dependencies and cleanup apt DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove ${BUILD_DEPENDENCIES} rm -rf /var/lib/apt/lists/* + +# clean up caches +exec_as_git rm -rf ${GITLAB_HOME}/.cache