docker run -p 8080:8080 -p 2181:2181 -v /tmp:/tmp -d -i 22c8f3413c46 /bin/bash
#端口映射、数据卷、并进入容器
docker exec -it a09d484d6108 /bin/bash #进入容器
docker commit -m "test commit" -a "chenbin" c4a8d7d48699 andraw916/centos7:v1
#提交容器成镜像
docker login
docker push andraw916/centos7:v1
登入到互联网远端仓库,并推送。
docker run --name data -v /opt/data -t -i docker.io/ubuntu /bin/bash
dokcer run --name dataShareTest -t -i -v /tmp:/tmp 4842f0bd3d61 /bin/bash
docker commit -m "test commit" -a "chenbin" c4a8d7d48699 andraw916/centos7:v1
docker commit -a "chenbin" -m "this is test" c4a8d7d48699 centos7:v1
docker commit -a “chenbin” -m “test commit” c4a8d7d48699 andraw916/centos7:v1
docker push andraw916/centos7:v1
后台运行命令(即使窗口都关了也还在运行):
tmux
tmux ls
tmux a -t 0 进入后台窗口