其他分享
首页 > 其他分享> > docker 常用

docker 常用

作者:互联网

运行镜像

docker run -it -p 宿主机端口:容器端口 --name=容器名字 镜像id

容器打包为镜像

docker commit 容器id 镜像名字
docker commit 57bacd929826 consolexin/ubuntu:2.2

镜像 tag

docker tag 镜像id dokcerhub地址:dockerhub命名
docker tag 2ffc967b14a0 consolexin/ubuntu:2.2

镜像上传

docker push dockerhub地址:dockerhub命名
docker push consolexin/ubuntu:2.2

标签:常用,dockerhub,tag,2.2,镜像,docker,id
来源: https://www.cnblogs.com/consolexinhun/p/16528254.html