Docker常用命令总结如下:

# 查看docker详细信息

docker info

 

# 获取当前节点所有容器

docker ps -a

 

# 管理容器生命周期

docker [start|stop|restart] <containerID|containerName>

 

# 查看容器日志

docker logs <containerID|containerName>

 

# 查看容器详细信息

docker inspect [containerID|imageID]

 

# 进入容器

docker exec -it <containerID|containerName> /bin/sh

 

# 删除容器

docker rm -f <containerID|containerName>

 

# 删除镜像

docker rmi -f <imageID|imageName:tag>

 

# 查看正在运行的容器资源使用情况

docker stats <containerID|containerName>

 

# 显示容器中正在运行的进程

docker top <containerID|containerName>

 

 

 

更多关于docker的使用,可以通过--help查看

Docker常用命令总结如下:

# 查看docker详细信息

docker info

 

# 获取当前节点所有容器

docker ps -a

 

# 管理容器生命周期

docker [start|stop|restart] <containerID|containerName>

 

# 查看容器日志

docker logs <containerID|containerName>

 

# 查看容器详细信息

docker inspect [containerID|imageID]

 

# 进入容器

docker exec -it <containerID|containerName> /bin/sh

 

# 删除容器

docker rm -f <containerID|containerName>

 

# 删除镜像

docker rmi -f <imageID|imageName:tag>

 

# 查看正在运行的容器资源使用情况

docker stats <containerID|containerName>

 

# 显示容器中正在运行的进程

docker top <containerID|containerName>

 

 

 

更多关于docker的使用,可以通过--help查看

相关文章:

  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2021-07-20
  • 2022-02-06
  • 2022-02-24
  • 2021-05-17
  • 2021-07-30
相关资源
相似解决方案