📜  删除 docker 容器 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:51.062000             🧑  作者: Mango

代码示例6
Remove Docker Container

# List all containers (only IDs)
docker ps -aq
# Stop all running containers
docker stop $(docker ps -aq)
# Remove all containers
docker rm $(docker ps -aq)
# Remove all images
docker rmi $(docker images -q)