All Products
Search
Document Center

Container Registry:Basic Docker operations

Last Updated:Jun 02, 2026

Learn how to use docker login, docker pull, and docker push with Container Registry (ACR) Enterprise Edition instances.

Prerequisites

docker login

The following example logs in to an Enterprise Edition instance in the China (Hangzhou) region.

  1. Run the login command with your Enterprise Edition instance domain name. Enter your username and password when prompted.

    Note
    • The domain name for the Enterprise Edition instance uses the format <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com. To find the domain name, log on to the Container Registry console and go to the Access Control page.

    • The logon password differs from your Alibaba Cloud account password. Configure access credentials.

    On success, Login Succeeded is displayed.

    docker login <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com
    Username: ****@test.com
    Password:
    Login Succeeded
  2. Verify your login credentials in config.json.

    Run the following command:

    cat ~/.docker/config.json

    Expected output:

    {
        "auths": {
            "<instance-name>-registry.cn-hangzhou.cr.aliyuncs.com": {
                "auth": "****"
            }
        }
    }        

docker pull

The following example pulls the image <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent:0.8.

Run the following command:

docker pull <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent:0.8

Expected output:

0.8: Pulling from acs/agent
5a026b6c4964: Already exists
e4b621e8d9cb: Already exists
8bc2fd04bdd4: Pull complete
a977b0087b3e: Pull complete
8f6e00ea13c6: Pull complete
875dd8c9666f: Pull complete
9c07bcabc35d: Pull complete
Digest: sha256:cac848bd31bccf2a041bda7b57e3051341093abde6859df9ee9d332dfec6ddd9
Status: Downloaded newer image for <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent:0.8            
Note

Run docker images to list downloaded images. Note the repository name and tag.

docker images

Expected output:

REPOSITORY                                                     TAG                 IMAGE ID            CREATED             SIZE
<instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent   0.8                 b9ba5841bdb0        24 hours ago        42.18 MB            

docker push

Push locally built images to your Enterprise Edition instance.

You must have the required repository permissions. Otherwise, the push fails with an authentication error.

Run the following command:

docker push <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent:0.8

The following output indicates that the push failed due to an authentication error:

The push refers to a repository [<instance-name>-registry.cn-hangzhou.cr.aliyuncs.com/acs/agent:0.8]
359f80267111: Layer already exists
7e5fa28d90b8: Layer already exists
b20d7f600f63: Layer already exists
4a159b4f8370: Layer already exists
7c3712ebe877: Layer already exists
d91d130a53aa: Layer already exists
fcad8ad5a40f: Layer already exists
unauthorized: authentication required            

Log on as a RAM user

  1. As a RAM user, log on to the Container Registry console and go to the Access Credentials page to set a logon password.

  2. Use [RAM username]@[enterprise alias] as the username to log on.

    Set or view the enterprise alias in the RAM console. If no enterprise alias is set, the Alibaba Cloud account UID is used by default.

    For example, if the RAM username is subaccount and the enterprise alias is account-alias:

    docker login <instance-name>-registry.cn-hangzhou.cr.aliyuncs.com
    Username: subaccount@account-alias
    Password:
    Login Succeeded