iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐋

Logging into Docker Desktop for Ubuntu with a Docker Hub Account

に公開

When using Docker Desktop on Ubuntu, I tried logging in with a Docker Hub account following the GUI instructions, but encountered the error Credential store not installed, which took some effort to resolve. Here's a memo of the solution.


Reference

https://docs.docker.com/desktop/setup/sign-in/#credentials-management-for-linux-users
Proceed according to the official documentation.

Docker Desktop for Linux relies on a mechanism called pass that stores credentials in a GPG-encrypted file.
https://www.passwordstore.org/

Login Procedure

Creating a GPG Key

$ gpg --generate-key

Run the command above to create a GPG key.
You will be prompted for a name and email – enter them accordingly.

After that, you will be asked to set a password. This password is required when performing GPG key operations on your PC, so you can set any value you like.
Again, it does not need to match your Docker Hub credentials.

Initialization

Once the GPG key is created, details will be displayed in the following format:

pub   rsa3072 2022-03-31 [SC] [expires: 2024-03-30]
      3ABCD1234EF56G78
uid                  Molly <molly@example.com>

The above is a sample from the official site.
Check the GPG ID shown in the pub line.

It may be a bit hard to spot, but in this example, 3ABCD1234EF56G78 is the GPG ID.

Execute the following command to initialize pass:

$ pass init [GPG ID]

When prompted for a password, enter the one you set during GPG key creation to complete the initialization.

Sign in to Docker Hub Account from Docker Desktop UI

Click the Sign in button located near the top right.
A browser window will open – follow the on-screen instructions to sign in to your Docker Hub account.


That's it.
With this, I was able to log in to Ubuntu's Docker Desktop with my Docker Hub account.

Discussion