From 6fda54c3d1958cdc0d7726b9127d2e25e000aad8 Mon Sep 17 00:00:00 2001 From: Jon Leech Date: Tue, 2 Jul 2024 19:54:45 -0700 Subject: [PATCH] Add a reminder to build-one.sh push operations to cleanup after yourself Docker builds and old images can consume vast amounts of space quickly. This just prints out a reminder and suggests some steps to take to clean up after yourself once an image is pushed (but when it's just built and not pushed). --- build-one.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-one.sh b/build-one.sh index 2fe8cac..76cb394 100755 --- a/build-one.sh +++ b/build-one.sh @@ -42,12 +42,15 @@ REPO="khronosgroup/docker-images" echo echo "** To refer to this image precisely, use:" echo " $REPO:$DOCKERFILE.$VERSION@$HASH" + + echo "After pushing an image, it is a good idea to clean up build cache and" + echo "unused images using commands like 'docker buildx prune'," + echo "'docker image ls -a --digests', and 'docker image rmi'" else echo echo "** Not pushing, so no SHA256 manifest available. Until you push this image, refer to it as:" echo " $REPO:$DOCKERFILE.$VERSION" fi - [ -n "$CI" ] && echo "::endgroup::" )