mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-12-16 23:20:13 +01:00
commit
e112c3fb7c
1 changed files with 13 additions and 0 deletions
13
README.md
13
README.md
|
|
@ -744,6 +744,19 @@ For all containers listed by image:
|
|||
docker ps -a -f ancestor=ubuntu
|
||||
```
|
||||
|
||||
Remove all untagged images
|
||||
```
|
||||
docker rmi $(docker images | grep “^” | awk “{print $3}”)
|
||||
```
|
||||
|
||||
Remove container by a regular expression
|
||||
```
|
||||
docker ps -a | grep wildfly | awk '{print $1}' | xargs docker rm -f
|
||||
```
|
||||
Remove all exited containers
|
||||
```
|
||||
docker rm -f $(docker ps -a | grep Exit | awk '{ print $1 }')
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue