This section describes how to obtain a login command that is valid for a year.
For security purposes, it is advised to obtain the login command in the development environment.
The access key ID (AK) and secret access key (SK) are a pair of access keys used together to authenticate users who wish to make API requests. The AK/AS pair provides functions similar to a password. If you already have an AK/SK, skip this step.
Keep the access key secure and do not disclose it to any unauthorized personnel.
printf "$AK" | openssl dgst -binary -sha256 -hmac "$SK" | od -An -vtx1 | sed 's/[ \n]//g' | sed 'N;s/\n//'
In the command, $AK and $SK indicate the AK and SK obtained in Step 2 respectively.
docker login -u [Regional project name]@[AK] -p [Login key] [Image repository address]
In the command, the regional project name and image repository address are obtained in Step 1, the AK in Step 2, and the login key in Step 3.
The login key is encrypted and cannot be decrypted. Therefore, other users cannot obtain the SK from -p.
The login command can be used on other devices.