Help Center/ Huawei Cloud EulerOS/ FAQs/ How Do I Save the User Credential Information for Logging In to Docker Like What Docker CE Does?
Updated on 2024-07-02 GMT+08:00

How Do I Save the User Credential Information for Logging In to Docker Like What Docker CE Does?

Background

When you run the docker login command to log in to Docker Community Edition (CE), data such as the username and password is saved in the user configuration file in Base64 format, which poses security risks. To ensure security, Docker included in HCE OS 2.0 encrypts the data by default. However, some Docker CE tools do not support this feature. You need to manually change the saving mode of Docker in Huawei Cloud EulerOS 2.0 like what Docker CE does.

Procedure

  1. Configure the required environment variable.
    export USE_DECRYPT_AUTH=true
  2. Run the docker login command to log in to Docker again.
    docker login

  3. Verify the data saving mode. It is recommended that you save the environment variable setting in a persistent file (such as ~/.bash_profile or /etc/profile) so the setting will be applied upon system reboot.
    echo "export USE_DECRYPT_AUTH=true" >> ~/.bash_profile