days ago 768MB
//此处我是拉取了自己制作的镜像,这里也可以拉取其他镜像
[root@client ~]# docker login harbor.example.com
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
//进行登录仓库,要指定仓库的名称
[root@client ~]# docker tag lvnanhai66/httpd:2.0 harbor.example.com/library/httpd:3.0
//把自己刚刚拉取的镜像进行封装一下
[root@client ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
lvnanhai66/httpd 2.0 523de2557ebe 2 days ago 768MB
harbor.example.com/library/httpd 3.0 523de2557ebe 2 days ago 768MB
//列出一下镜像
[root@client ~]# docker push harbor.example.com/library/httpd:3.0
The push refers to repository [harbor.example.com/library/httpd]
b873763b4ca4: Pushed
0fabae23f82c: Pushed
74ddd0ec08fa: Pushed
3.0: digest: sha256:f8e25d4e1d8688526dfdff8919da43c667f708159ebcd3e7d6b5c9993f280ef6 size: 950
//把镜像进行上传
查看上传的镜像: 可以看见刚刚上传的镜像
|