1
0
mirror of https://github.com/xcad2k/cheat-sheets.git synced 2022-05-05 20:20:37 +03:00

Merge pull request #2 from sakthiRathinam/main

Container bulk management commands
This commit is contained in:
Christian
2021-09-15 09:37:13 +02:00
committed by GitHub

View File

@@ -10,6 +10,25 @@ COMMAND | DESCRIPTION
`docker pause CONTAINER` | Suspend a container
`docker unpause CONTAINER` | Resume a container
`docker rm CONTAINER` | Destroy a container
## Container Bulk Management
COMMAND | DESCRIPTION
---|---
`docker stop $(docker ps -q)` | To stop all the running containers
`docker stop $(docker ps -a -q)` | To stop all the stopped and running containers
`docker kill $(docker ps -q)` | To kill all the running containers
`docker kill $(docker ps -a -q)` | To kill all the stopped and running containers
`docker restart $(docker ps -q)` | To restart all running containers
`docker restart $(docker ps -a -q)` | To restart all the stopped and running containers
`docker rm $(docker ps -q)` | To destroy all running containers
`docker rm $(docker ps -a -q)` | To destroy all the stopped and running containers
`docker pause $(docker ps -q)` | To pause all running containers
`docker pause $(docker ps -a -q)` | To pause all the stopped and running containers
`docker start $(docker ps -q)` | To start all running containers
`docker start $(docker ps -a -q)` | To start all the stopped and running containers
`docker rm -vf $(docker ps -a -q)` | To delete all containers including its volumes use
`docker rmi -f $(docker images -a -q)` | To delete all the images
### Parameters
COMMAND | DESCRIPTION