Merge pull request #1227 from Roei-Bracha/patch-1

add some clean up commends
This commit is contained in:
Rico Sta. Cruz 2019-10-15 20:27:51 +11:00 committed by GitHub
commit 5f56569a11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

View File

@ -123,6 +123,48 @@ docker rmi b750fe78269d
Deletes `image`s. Deletes `image`s.
## Clean up
### Clean all
```sh
docker system prune
```
Cleans up dangling images, containers, volumes, and networks (ie, not associated with a container)
```sh
docker system prune -a
```
Additionally remove any stopped containers and all unused images (not just dangling images)
### Containers
```sh
# Stop all running containers
docker stop $(docker ps -a -q)
# Delete stopped containers
docker container prune
```
### Images
```sh
docker image prune [-a]
```
Delete all the images
### Volumes
```sh
docker volume prune
```
Delete all the volumes
Also see Also see
-------- --------