docker在vulhub中的使用命令合集
(1)docker ps(查询 docker 进程的所有容器)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210122717427-1741252551.png)
(2)docker info(查看docker详细信息)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210122811616-427274673.png)
(3)service docker start(启动docker服务)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210123020305-1543207280.png)
(4)docker version(查询docker版本信息)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210123255085-2005104529.png)
(5)docker -v(快速查看docker版本)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210123347343-1468021111.png)
(6)docker stop 容器ID(暂停容器)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210123651663-1982687517.png)
(7)docker start 容器ID (开启容器)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210123801390-1713292797.png)
(8)docker rm 容器ID(删除容器)
(9)sudo docker-compose build
(10)sudo docker-compose up -d
(11)docker-compose down #关闭本次漏洞环境
(12)docker exec -it 容器id bash
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210131017666-272435646.png)
(13)exit (退出容器内部)
![](https://img2020.cnblogs.com/blog/1674381/202102/1674381-20210210132540302-975649691.png)
原文地址:https://www.cnblogs.com/cute-puli/p/14395541.html