Skip to content

Commit

Permalink
Add a reminder to build-one.sh push operations to cleanup after yourself
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
oddhack authored and rpavlik committed Jul 24, 2024
1 parent 88f979c commit 4d34d39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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::"
)

0 comments on commit 4d34d39

Please sign in to comment.