1
This commit is contained in:
commit
9c68b2789a
16
Makefile
Normal file
16
Makefile
Normal 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
12
cleanup-all-images.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user