Push your own image to NetEase Cloud

push local mirror

This article describes how to push local images to your NetEase Cloud private image repository to deploy containers or clusters on NetEase Cloud.

Note: Docker client version requires 1.7 and above.

1. List local mirrors

docker images

2. Start the container in the background and verify that the configuration is correct

docker run -d {image name or ID} docker ps

3. Log in to NetEase Cloud Mirror Warehouse

docker login -u {your NetEase cloud email account or mobile phone number} -p {your NetEase cloud password} hub.c.163.com

Returning "Login Succeded" means the login is successful.

4. Tag the local mirror

docker tag {image name or ID} hub.c.163.com/{your username}/{tag name}

Your NetEase Cloud Mirror Warehouse push address is hub.c.163.com/{你的用户名}/{标签名}

Attention: This is your username, not your email account or mobile phone number to log in to the NetEase Cloud console. The right side of the avatar in the upper right corner of the page is the "username"

  • When pushing to a non-existing mirror warehouse, automatically create a mirror warehouse and save the newly pushed mirror version;
  • When pushing to an existing mirror warehouse, save the newly pushed version in the mirror warehouse, and overwrite the original mirror when the version number is the same.

5. Push to NetEase Cloud Mirror Warehouse

docker push hub.c.163.com/{your username}/{tagname}

The default is a private mirror repository. After the push is successful, you can view it in the "Mirror Repository" of the console.

Attention

  1. If the number of your mirror repositories reaches the quota limit (10 by default), you cannot push the local mirror to the mirror repository, and an error message will appear: "request failed with status: 403 Forbidden".
  2. The image is too large. When the push time exceeds 15 minutes, the authentication will fail, and the prompt [unauthorized: authentication required`] will be displayed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325854604&siteId=291194637