Ten years of JAVA moving bricks——Docker from novice to master—docker submits its own image, and docker local image is submitted to the server

Docker from novice to master – docker submits its own mirror, docker local mirror submits to the server

commit a new mirror to create a new mirror

docker commit -m="vim add" -a="shu" 81a7b35404a9 shu/ubuntu:21.1.0

-  commit :表示提交命令,用于创建一个新的镜像。 
-  -m="vim add" :表示提交时的说明信息,这里是将提交信息设置为"vim add",以便描述该镜像的变更。 
-  -a="shu" :表示提交时的作者信息,这里是将作者设置为"shu"。 
-  81a7b35404a9 :是要创建镜像副本的容器的 ID 或名称。在此处, 81a7b35404a9  是容器的 ID。 
-  shu/ubuntu:21 :表示新镜像的名称和标签。这里是将新镜像命名为  
-21.1.0,并设置标签为  21.1.0。 

Pull a local image to the remote warehouse

docker push  harbor.common.cn/operation/javabase:1.8.0

-harbor.common.cn 仓库域名
-operation 仓库里面的项目名称
-javabase 在项目里的名称
-1.8.0 镜像版本

There may be a problem, and you have not logged in to the private server.
Login to the private server command

  docker login  harbor.common.cn

Or put the /etc/docker file in /etc/docker

Guess you like

Origin blog.csdn.net/weixin_43485737/article/details/132581209