要进入Docker容器,需要按照以下步骤进行操作:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2d3a5b6d8f1e ubuntu:14.04 "/bin/bash" 4 days ago Up 4 days 0.0.0.0:80->80/tcp my_container
$ docker exec -it 2d3a5b6d8f1e /bin/bash
root@2d3a5b6d8f1e:/# ls bin dev home lib64 mnt proc run srv tmp var boot etc lib media opt root sbin sys usr
root@2d3a5b6d8f1e:/# exit
本文链接:http://task.lmcjl.com/news/2239.html