This section uses the nginx:1.10 image as an example to describe how to upload a private image from an intranet to the CCE image repository. Images will be displayed in the image repository after being uploaded.
For more information on how to log in to a VM created in CCE, see Logging In to a VM Node.
Information similar to the following is displayed.
Client: Version: 1.11.2 UnicornVersion:220.127.116.11 ……
In the preceding information, Version indicates the version number of the Docker.
docker login -u eu-de@MMZES9KTH43ELTVYTGXA -p c4c8b79699abe427daf60b8035955230c146f744b990b03f7f30a5cb89fb382c 10.158.24.86
docker login -u eu-de@MMZES9KTH43ELTVYTGXA -p c4c8b79699abe427daf60b8035955230c146f744b990b03f7f30a5cb89fb382c 10.125.7.25:20202
After you successfully log in to the Docker client, "login succeeded" is displayed.
docker tag [Original image name:Original version number] [Private network address of the repository that holds the image]/[Custom namespace][Custom image repository name]:[Version number]
docker tag nginx:1.10 10.125.7.25:20202/test/nginx:1.10
docker push 10.125.7.25:20202/test/nginx:1.10
If the image has been successfully pushed, the following information is displayed:
6d6b9812c8ae: Pushed 695da0025de6: Pushed fe4c16cbf7a4: Pushed 1.10: digest: sha256:eb7e3bbd8e3040efa71d9c2cacfa12a8e39c6b2ccd15eac12bdc49e0b66cee63 size: 948
On the CCE console, refresh the Image Repository > imagename page of the image repository. The uploaded image is displayed in the image list.