Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of the steps for uploading Docker image to Ali Cloud

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1 install the Docker runtime environment

Reference documentation: https://docs.docker.com or https://www.jb51.net/article/94198.htm

2 sign up for Aliyun account

Aliyun official website link: https://dev.aliyun.com/search.html

For example:

Account: msjtest

Password: 123456

3 login account

4 manage Docker Hub mirror sites: configure Docker Accelerator

Link: https://cr.console.aliyun.com/?spm=5176.1971733.0.2.duOGn4#/accelerator

5. Create the namespace of the image repository

For example: msj

Link: https://cr.console.aliyun.com/?spm=5176.1971733.0.2.duOGn4#/namespace/index

6. Create an image repository

For example: image-test

Link: https://cr.console.aliyun.com/?spm=5176.1971733.0.2.duOGn4#/imageList

7 Operation Guide

1) Log in to Aliyun docker registry:

$sudo dockerlogin-username=msjtest registry.cn-hangzhou.aliyuncs.com

Note: the user name of logging in to registry is the full name of your Aliyun account, and the password is the password set when you activate namespace.

2) pull the image from registry:

$sudo dockerpull registry.cn-hangzhou.aliyuncs.com/msj/image-test: [image version number]

3) push the image to registry:

$sudo dockerlogin-- username=mashujie registry.cn-hangzhou.aliyuncs.com$ sudo dockertag [ImageId] registry.cn-hangzhou.aliyuncs.com/msj/image-test: [image version number] $sudo dockerpush registry.cn-hangzhou.aliyuncs.com/msj/image-test: [image version number]

Please enter [ImageId] and [Image version number] according to your own image information.

8 the terminal executes the script code

# login command $docker login-- username=mashujieregistry.cn-hangzhou.aliyuncs.com# view host image $docker images# copy image ID and set tag (or tag repository:tag) $docker tag 96eecaf1019a registry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01 $docker tag image01:01registry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01# to upload image to Ali Cloud Image Repository $docker pushregistry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report