标签:docker 查看 删除
在nginx容器内编辑配置文件:将宿主的vi所在的目录挂载为容器的/bin
docker run -it -v /usr/bin:/bin nginx /bin/sh #vi /etc/nginx/nginx.conf
批量删除容器:
docker rm $(docker ps -a -q)
[root@localhost ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8e4ca9b36187 learn/ping "ping www.baidu.com" 23 hours ago Exited (0) 23 hours ago adoring_leavitt aaf15374785c learn/tutorial "apt-get install -y p" 24 hours ago Exited (0) 24 hours ago high_perlman 3cae0f4e0f90 learn/tutorial "echo ‘hello world‘" 24 hours ago Exited (0) 24 hours ago determined_mcnulty f0a26e9ce9a8 nginx:1.9 "nginx -g ‘daemon off" 38 hours ago Exited (0) 8 hours ago high_hodgkin a892ef304b92 nginx:1.9 "nginx -g ‘daemon off" 38 hours ago Created pedantic_northcutt [root@localhost ~]# docker rm $(docker ps -a -q) 8e4ca9b36187 aaf15374785c 3cae0f4e0f90 f0a26e9ce9a8 a892ef304b92 [root@localhost ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
标签:docker 查看 删除
原文地址:http://jansen.blog.51cto.com/2817681/1865492