Get the App
SLTechnology News&Howtos  ›  Servers  › 

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

Shulou Source: shulou.com Published: 2022-06-02 03:59:20 10月02日 Update

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.

Tags: Image Ali version link warehouse password account login login host code information full name content accelerator command official website that is guide Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL MariaDB vpn NVidia