Added Clean Up to docker

This commit is contained in:
fechin committed 2023-01-09 11:22:48 +08:00
1 parent 47471ecab8
commit d1728ad601
1 file changed
+11 -6
+11 -6
View File
@@ -227,17 +227,18 @@ Clean Up {.cols-2}
### Clean All
Cleans up dangling images, containers, volumes, and networks (ie, not associated with a container)
```shell
docker system prune
```
Cleans up dangling images, containers, volumes, and networks (ie, not associated with a container)
-------
Additionally, remove any stopped containers and all unused images (not just dangling images)
```shell
docker system prune -a
```
Additionally, remove any stopped containers and all unused images (not just dangling images)
@@ -255,10 +256,15 @@ docker container prune
### Images
Remove all dangling (not tagged and is not associated with a container) images:
```shell
docker image prune [-a]
docker image prune
```
Remove all images which are not used by existing containers
```shell
docker image prune -a
```
Delete all the images
### Volumes
@@ -266,8 +272,7 @@ Delete all the images
```shell
docker volume prune
```
Delete all the volumes
Remove all volumes not used by at least one container