https://medium.com/better-programming/docker-tips-clean-up-your-local-machine-35f370a01a78

Overall Consumption

$ docker system df

Prune

The following commands allow us to delete all stopped containers at once and to reclaim the disk space they’re using:

$ docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
5e7f8e5097ace9ef5518ebf0c6fc2062ff024efb495f11ccc89df21ec9b4dcc2
Total reclaimed space: 104.9MB

Images Disk Usage

The following commands list the existing dangling image on the system:

$ docker image ls -f dangling=true
REPOSITORY  TAG      IMAGE ID         CREATED             SIZE
<none>      <none>   21e658fe5351     12 minutes ago      71.3MB

To remove the dangling image we can go the long way:

$ docker image rm $(docker image ls -f dangling=true -q)

0 commenti

Lascia un commento

Segnaposto per l'avatar