docker run -p 127.0.0.1:20001:22 -ti centos /bin/bash
2、daemon方式启动容器
docker run -d -p 127.0.0.1:5000:22 -ti centos /bin/bash docker run -ti -p 0.0.0.0:7600:9600 -p 0.0.0.0:7603:9603 -ti configserver2.lhm /bin/bash
docker attach eb93ec3a3143ae732cedf573538e9117eb9897c4f93816c6b9821dbc7549f50c
docker top 261ea009ae26
docker logs -f 261ea009ae26
docker rm 261ea009ae26
docker commit -m="add test" cs1 css
docker run -t -i cstest/cstest1 /bin/bash
docker rmi -f a401549ebc9e
docker inspect -f "{{ .Name }}" 43ee0f38db1a
iptables -t nat -L -n DNAT tcp -- 0.0.0.0/0 127.0.0.1 tcp dpt:5000 to:172.17.0.98:22
docker run -d -ti --name cs1 -v /home/hongmin.lhm/dockerdata:/opt/dockerdata -i css.lhm /bin/bash
docker run -d -p 0.0.0.0:9600:9600 -p 0.0.0.0:9603:9603 -i css.lhm sh -c /root/css/bin/csstart.sh
docker exec -i 147303d8da03 mkdir /root/abc
原文地址:http://blog.csdn.net/lihm0_1/article/details/42555731