Docker 容器管理: docker create -it centos //这样可以创建一个容器,但该容器并没有启动:create Create a new container 创建一个容器:docker:/root# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES38deed33103b 192.168.32.150:5000/zjzc_centos6.5_app "bash" 3 months ago Up About a minute zjtest8_app01 后台运行docker: run Run a command in a new container在一个新的容器里运行一个命令docker run 创建一个新的容器 docker:/root# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES38deed33103b 192.168.32.150:5000/zjzc_centos6.5_app "bash" 3 months ago Up 5 minutes zjtest8_app01 docker:/root# docker run -itd 192.168.32.150:5000/zjzc_centos6.5_haproxy /bin/bashe0c7534aa977b2488efe4daf64f497fa6848fe6f4acb212f37dca692181285fcdocker:/root# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESe0c7534aa977 192.168.32.150:5000/zjzc_centos6.5_haproxy "/bin/bash" 3 seconds ago Up 1 seconds boring_stallman 38deed33103b 192.168.32.150:5000/zjzc_centos6.5_app "bash" 3 months ago Up 5 minutes zjtest8_app01 docker:/root# docker exec -it e0c7534aa977 bash 执行命令