Skip to content
On this page

容器

查看容器

查看运行的容器

shell
docker ps

查看所有容器,包括停止的容器

shell
docker ps -a

创建容器

shell
docker run <image name>

运行容器

shell
docker start <container id>

停止容器

shell
docker stop <container id>

删除容器

shell
docker rm <container id>

登录容器

shell
docker exec -it <container id> /bin/bash

退出

shell
exit