[root@localhost ~] Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one. Username: 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@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE demo latest 1e5f6711d527 3 days ago 178MB [root@localhost ~]# docker tag demo:latest ***/demo:v1 [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE demo latest 1e5f6711d527 3 days ago 178MB ***/demo v1 1e5f6711d527 3 days ago 178MB [root@localhost ~]#
Push
1 2 3 4 5 6 7 8
[root@localhost ~]# docker push ***/demo:v1 The push refers to repository [docker.io/***/demo:v1] 833a0t6a6ff9: Pushed 10bfe4y2500e: Pushed d43sfdd7d594: Mounted from library/nginx c2adabsadfed: Mounted from library/nginx v1: digest: sha256:67dcdae5578c0374019bdc899731543cfd7c48fe5780e84233a258f2bf7d2ceda size: 1155 [root@localhost ~]#
Pull
1 2 3 4 5
[root@localhost ~]# docker pull ***/demo:v1 v1: Pulling from ***/demo:v1 Digest: sha256:67dcdae5578c0374019bdc899731543cfd7c48fe5780e84233a258f2bf7d2ceda Status: Downloaded newer image for ***/demo:v1 docker.io/llxxyy/nginx-io:v1