Make make docker-clean to remove docker build cache (#1790)

Makefile: add docker-clean sub-targets to remove not only image but cache (eats lot of space sometimes) & update help output / add clean-up of docker cache to deploy.sh as well

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
This commit is contained in:
Ivan Zorin
2023-08-09 08:38:45 +03:00
committed by GitHub
parent d5035bb956
commit 130e73c1fe
2 changed files with 24 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ usage()
echo "CMD (docker related):"
echo -e "\tshell - start docker container with shell inside to work on IronOS with all tools needed"
echo -e "\tbuild - compile builds of IronOS inside docker container for supported hardware"
echo -e "\tclean - delete created docker container (but not pre-downloaded data for it)\n"
echo -e "\tclean - delete created docker image for IronOS & its build cache objects\n"
echo "CMD (helper routines):"
echo -e "\tdocs_readme - generate & OVERWRITE(!) README.md inside Documentation/ based on nav section from mkdocs.yml if it changed\n"
echo -e "\tcheck_style_file SRC - run code style checks based on clang-format & custom parsers for source code file SRC\n"
@@ -194,6 +194,7 @@ elif [ "${cmd}" = "build" ]; then
docker_cmd="run --rm builder make build-all OUT=${OUT}"
elif [ "${cmd}" = "clean" ]; then
docker rmi ironos-builder:latest
docker system prune --filter label=ironos-builder:latest --force
exit "${?}"
else
usage