docker mirrored Ali cloud push

1. Log Ali cloud Docker Registry

$ sudo docker login [email protected] registry.cn-beijing.aliyuncs.com

The user name used to log Ali cloud account full name, password, password set at the opening of the service.

You can modify the credential password credentials to access the page.

2. The image taken from the Registry pull

$ sudo docker pull registry.cn-beijing.aliyuncs.com/dean0731/mysql:[镜像版本号]

3. Mirror push Registry

$ sudo docker login --username=youremail registry.cn-beijing.aliyuncs.com
$ sudo docker tag [ImageId] registry.cn-beijing.aliyuncs.com/dean0731/mysql:[镜像版本号]
$ sudo docker push registry.cn-beijing.aliyuncs.com/dean0731/mysql:[镜像版本号]

Please replace the actual image example of the information [ImageId,] and [image version number] parameters.

4. Select the appropriate address of the warehouse mirror

When push mirroring from ECS, you can choose to use the image within the warehouse network address. Push the speed will be enhanced and the loss will not be your public network traffic.

If you are using a machine located VPC network, please login using the domain name registry-vpc.cn-beijing.aliyuncs.com as Registry and as a mirror namespace prefix.

Example 5

Use "docker tag" command to rename the image, and it is pushed through the private network address Registry.

$ sudo docker imagesREPOSITORY                                                         TAG                 IMAGE ID            CREATED             VIRTUAL SIZEregistry.aliyuncs.com/acs/agent                                    0.7-dfb6816         37bb9c63c8b2        7 days ago          37.89 MB
$ sudo docker tag 37bb9c63c8b2 registry-vpc.cn-beijing.aliyuncs.com/acs/agent:0.7-dfb6816

Use "docker images" command to find the image, change the image name in the domain part of Registry proprietary network address.

$ sudo docker push registry-vpc.cn-beijing.aliyuncs.com/acs/agent:0.7-dfb6816

Guess you like

Origin www.cnblogs.com/Dean0731/p/12006291.html