• Cloud Container Engine

  1. Help Center
  2. Cloud Container Engine
  3. User Guide 2.0
  4. Image Repository
  5. Obtaining a Long-Term Valid Docker Login Command

Obtaining a Long-Term Valid Docker Login Command

This chapter describes how to obtain a long-term valid docker login command.


  1. Obtain an image repository address and the name of a regional project.

    1. Visit https://console.otc.t-systems.com/iam/#/myCredential.
    2. On the Projects tab page, view the project corresponding to the current region.

      The eu-de project corresponds to eu-de, as shown in the following figure.

      Figure 1 Regions and projects
    3. Obtaining the image repository address in CCE Console.
      Figure 2 Image repository address

  2. Obtain the Access Key ID/Secret Access Key (AK/SK).


    If the AK/SK is available, you can directly use it.

    1. Visit https://console.otc.t-systems.com/iam/#/myCredential.
    2. On the Access Keys tab page, click Add Access Key to create an access key.
      Figure 3 Adding an access key
    3. Enter the login password of the current user and verify the password by email or mobile phone.

      For the accounts created in Identity and Access Management (IAM), if no email address or mobile phone is filled during account creation, you only need to verify the login password.

    4. Click OK to download an access key.
      Properly keep the downloaded key. You need to upload the key when creating a cluster. Otherwise, the cluster cannot be created.

      Keep the access key confidential to prevent information leakage.

  3. Log in to a Linux PC and run the following command to obtain the login key:

    printf "$AK" | openssl dgst -binary -sha256 -hmac "$SK" | od -An -vtx1 | sed 's/[ \n]//g' | sed 'N;s/\n//'

    In the preceding information, $AK and $SK respectively indicate the AK and SK obtained in 2.


  4. Splice the docker login command in the following format:

    docker login -u [Name of the regional project]@[AK] -p [Login key] [Image repository address]

    In the preceding information, the name of the regional project and the image repository address are obtained in 1, the AK is obtained in 2, and the login key is the execution result in 3.


    docker login -u eu-de@kwb1******5IdAD -p 7ca3582173f52caa98fcf87389e9cc26d007a2e4b2f6231006a301568f2e1ef8