Containers are great and I use them frequently. From GKE and Cloud Run through to ECS and EKS, Containers permeate my professional life.
So I tend to build up a lot of Docker mess and need to clean up every so often. So this is my cheat sheet to save me hitting up DuckDuckGo.
How much space is Docker using?
$ docker system df
-v to get a better breakdown.
Just clean it all up
Clean up, but keep tagged images:
$ docker system prune
To get rid of as much as possible:
$ docker system prune -a
Prune specific items
$ docker image prune
-a for dangling images only.
$ docker container prune
$ docker volume prune
2022-03-21 17:00 (Last updated: 2022-03-22 04:54)
d4e4bb9 @ 2022-03-22