[root@localhost ~]# docker login 192.168.126.162 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
[root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE vmware/harbor-jobservice v1.1.2 4ef0a7a33734 24 months ago 163MB vmware/harbor-ui v1.1.2 4ee8f190f366 24 months ago 183MB vmware/harbor-adminserver v1.1.2 cdcf1bed7eb4 24 months ago 142MB vmware/harbor-db v1.1.2 fcb8aa7a0640 24 months ago 329MB vmware/registry 2.6.1-photon 0f6c96580032 2 years ago 150MB vmware/nginx 1.11.5-patched 8ddadb143133 2 years ago 199MB vmware/harbor-log v1.1.2 9c46a7b5e517 2 years ago 192MB [root@localhost ~]# docker tag vmware/nginx:1.11.5-patched 192.168.126.162/harbor/nginx:latest [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE vmware/harbor-jobservice v1.1.2 4ef0a7a33734 24 months ago 163MB vmware/harbor-ui v1.1.2 4ee8f190f366 24 months ago 183MB vmware/harbor-adminserver v1.1.2 cdcf1bed7eb4 24 months ago 142MB vmware/harbor-db v1.1.2 fcb8aa7a0640 24 months ago 329MB vmware/registry 2.6.1-photon 0f6c96580032 2 years ago 150MB 192.168.126.162/harbor/nginx latest 8ddadb143133 2 years ago 199MB vmware/nginx 1.11.5-patched 8ddadb143133 2 years ago 199MB vmware/harbor-log v1.1.2 9c46a7b5e517 2 years ago 192MB
docker images REPOSITORY TAG IMAGE ID CREATED SIZE vmware/harbor-jobservice v1.1.2 4ef0a7a33734 24 months ago 163MB vmware/harbor-ui v1.1.2 4ee8f190f366 24 months ago 183MB vmware/harbor-adminserver v1.1.2 cdcf1bed7eb4 24 months ago 142MB vmware/harbor-db v1.1.2 fcb8aa7a0640 24 months ago 329MB vmware/registry 2.6.1-photon 0f6c96580032 2 years ago 150MB 192.168.126.162/harbor/nginx latest 8ddadb143133 2 years ago 199MB vmware/nginx 1.11.5-patched 8ddadb143133 2 years ago 199MB vmware/harbor-log v1.1.2 9c46a7b5e517 2 years ago 192MB [root@localhost ~]# docker rmi 192.168.126.162/harbor/nginx:latest Untagged: 192.168.126.162/harbor/nginx:latest Untagged: 192.168.126.162/harbor/nginx@sha256:3dce35afeadd7195877b17bf1514b9e388ed671afe428441fe5e0b02cdc26eeb
退出admin帐号,使用刚刚创建的用户登录
1 2 3 4 5 6 7 8 9 10
[root@localhost ~]# docker logout 192.168.126.162 Removing login credentials for 192.168.126.162 [root@localhost ~]# docker login 192.168.126.162 Username: harbor 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
将harbor中的nginx镜像拉取到本地
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[root@localhost ~]# docker pull 192.168.126.162/harbor/nginx:latest latest: Pulling from harbor/nginx Digest: sha256:3dce35afeadd7195877b17bf1514b9e388ed671afe428441fe5e0b02cdc26eeb Status: Downloaded newer image for 192.168.126.162/harbor/nginx:latest [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE vmware/harbor-jobservice v1.1.2 4ef0a7a33734 24 months ago 163MB vmware/harbor-ui v1.1.2 4ee8f190f366 24 months ago 183MB vmware/harbor-adminserver v1.1.2 cdcf1bed7eb4 24 months ago 142MB vmware/harbor-db v1.1.2 fcb8aa7a0640 24 months ago 329MB vmware/registry 2.6.1-photon 0f6c96580032 2 years ago 150MB 192.168.126.162/harbor/nginx latest 8ddadb143133 2 years ago 199MB vmware/nginx 1.11.5-patched 8ddadb143133 2 years ago 199MB vmware/harbor-log v1.1.2 9c46a7b5e517 2 years ago