Skip to content

Docker Desktop on Debian 13

A step-by-step guide to installing Docker Desktop on Debian 13 with proper credential management.

  • Debian 13 (or 12) system
  • Internet connection
  • Terminal access

Step 1: Add Docker’s Official Repository

Section titled “Step 1: Add Docker’s Official Repository”

First, install required dependencies:

Terminal window
sudo apt update
sudo apt install ca-certificates curl

Create the keyrings directory and add Docker’s GPG key:

Terminal window
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Add Docker’s official repository:

Terminal window
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

If you have Docker installed from Debian’s repositories, there may be conflicting packages. Remove them:

Terminal window
sudo apt remove docker-buildx docker-compose

Update your package list and install the official Docker CLI:

Terminal window
sudo apt update
sudo apt install docker-ce-cli

Clean up any unused dependencies:

Terminal window
sudo apt autoremove

Step 4: Download and Install Docker Desktop

Section titled “Step 4: Download and Install Docker Desktop”

Download the Docker Desktop DEB package from the Docker Desktop release page or using wget:

Terminal window
cd ~/Downloads
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-amd64.deb

Install Docker Desktop:

Terminal window
sudo apt install ./docker-desktop-amd64.deb

Step 5: Set Up GPG Key for Credential Management

Section titled “Step 5: Set Up GPG Key for Credential Management”

Generate a GPG key (required for secure credential storage):

Terminal window
gpg --generate-key

Follow the prompts to enter your details. The output will show your GPG key ID, which looks like:

E64B253FC0A9C047E6FAD55E8B1D86868A885711

Save this key ID — you’ll need it in the next step.

Edit your Docker config file:

Terminal window
nano ~/.docker/config.json

Change "credsStore": "desktop" to "credsStore": "pass":

{
"auths": {},
"credsStore": "pass",
"currentContext": "desktop-linux"
}

Save the file (Ctrl+O, Enter, Ctrl+X in nano).

Initialize pass with your GPG key (replace with your actual key ID):

Terminal window
pass init E64B253FC0A9C047E6FAD55E8B1D86868A885711

Verify that docker-credential-pass is installed:

Terminal window
which docker-credential-pass

It should show /usr/bin/docker-credential-pass.

As your regular user (not root), start Docker Desktop:

Terminal window
systemctl --user start docker-desktop

Check that it’s running:

Terminal window
systemctl --user status docker-desktop

Open Docker Desktop from your applications menu (under “Development” in KDE). Click the “G” icon to sign in with Google and complete the authentication process.

Your credentials will now be securely stored using pass and your GPG key.

Test that Docker is working:

Terminal window
docker version
docker run hello-world

Optional: Enable Docker Desktop on Startup

Section titled “Optional: Enable Docker Desktop on Startup”

To automatically start Docker Desktop when you log in:

Terminal window
systemctl --user enable docker-desktop

Docker Desktop won’t start:

  • Make sure you’re running commands as your regular user, not root
  • Check status with: systemctl --user status docker-desktop

Login fails:

  • Verify pass is initialized: pass
  • Check GPG key: gpg --list-keys
  • Restart Docker Desktop: systemctl --user restart docker-desktop

Permission denied errors:

  • Add your user to the docker group: sudo usermod -aG docker $USER
  • Log out and log back in for changes to take effect