2015年6月26日 星期五

[ 常見問題 ] Docker - Stop / remove all Docker containers

Source From Here
One liner to stop / remove all of Docker containers:
// -a, --all=false Show all containers (default shows just running)
// -q, --quiet=false Only display numeric IDs

# echo $(docker ps -a -q)
6ca1c890e3f2 607d3ad2e4c8 67430c23a16d cc86b1ba697c 9ff17926b736 f12b657aa412 ef217701a1b7 33f15b0c22f2 1fb091625c6d
# docker stop $(docker ps -a -q) // Stop all containers
# docker rm $(docker ps -a -q) // Remove all containers


沒有留言:

張貼留言

[Linux 常見問題] sudo: Sorry, you must have a tty to run sudo Error on a Linux and Unix

Source From  Here   Preface   I‘m trying to run the following command:  #   ssh  user@box.example.com  sudo command1 /path/to/file But, a...