1.docker啓動,中止docker
service docker startcentos
service docker stopbash
2.查看docker進程centos7
docker ps3d
3.查看docker鏡像進程
docker imagesopenshift
4.進入dockerit
sudo docker run -i -t openshift/base-centos7 /bin/bashtest
5.拷貝宿主文件到dockerservice
sudo docker cp test.tar 6d7ce9a813d4:/home
6.提交鏡像
docker commit image-id
7.共享宿主文件到鏡像
docker run -it -v /home/haha:/share microsoft/dotnet:latest /bin/bash
8.端口映射
docker run -p 8090:8090 -it 4f0cfb93072a /bin/bash