Docker bulk operations related commands

View docker run state

systemctl status docker

Start / Stop docker Service

systemctl start/stop docker

Docker View Mirror

docker images

View dokcer container services operating state

docker ps -a

Start all containers

docker start $(docker ps -a | awk '{ print $1}' | tail -n +2)

Stop all containers

docker stop $(docker ps -aq)

Remove all containers

docker rm $(docker ps -aq)

Remove all mirrors

docker rmi $(docker images -q)

Guess you like

Origin www.cnblogs.com/jassa/p/12583719.html