This commit is contained in:
Eliezer Croitoru 2023-12-23 12:28:27 +00:00
commit 9c68b2789a
2 changed files with 28 additions and 0 deletions

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
all:
echo OK
cleanup-containers:
printf "y\n" | docker container prune
cleanup-images:
printf "y\n" | docker image prune
prune-system:
docker system prune --all
cleanup-all-images:
sh cleanup-all-images.sh
cleanup: cleanup-containers cleanup-images

12
cleanup-all-images.sh Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env sh
#IMAGES=$(docker images --filter "dangling=true" -q --no-trunc)
IMAGES=$(docker images -q --no-trunc)
if [ -z "${IMAGES}" ]
then
echo "There are no images to cleanup"
else
docker rmi ${IMAGES}
fi