Docker Desktop on Debian 13
A step-by-step guide to installing Docker Desktop on Debian 13 with proper credential management.
Prerequisites
Section titled “Prerequisites”- 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:
sudo apt updatesudo apt install ca-certificates curlCreate the keyrings directory and add Docker’s GPG key:
sudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.ascAdd Docker’s official repository:
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/nullStep 2: Remove Conflicting Packages
Section titled “Step 2: Remove Conflicting Packages”If you have Docker installed from Debian’s repositories, there may be conflicting packages. Remove them:
sudo apt remove docker-buildx docker-composeStep 3: Install Docker CE CLI
Section titled “Step 3: Install Docker CE CLI”Update your package list and install the official Docker CLI:
sudo apt updatesudo apt install docker-ce-cliClean up any unused dependencies:
sudo apt autoremoveStep 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:
cd ~/Downloadswget https://desktop.docker.com/linux/main/amd64/docker-desktop-amd64.debInstall Docker Desktop:
sudo apt install ./docker-desktop-amd64.debStep 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):
gpg --generate-keyFollow the prompts to enter your details. The output will show your GPG key ID, which looks like:
E64B253FC0A9C047E6FAD55E8B1D86868A885711Save this key ID — you’ll need it in the next step.
Step 6: Configure Docker Credentials
Section titled “Step 6: Configure Docker Credentials”Edit your Docker config file:
nano ~/.docker/config.jsonChange "credsStore": "desktop" to "credsStore": "pass":
{ "auths": {}, "credsStore": "pass", "currentContext": "desktop-linux"}Save the file (Ctrl+O, Enter, Ctrl+X in nano).
Step 7: Initialize Pass Password Manager
Section titled “Step 7: Initialize Pass Password Manager”Initialize pass with your GPG key (replace with your actual key ID):
pass init E64B253FC0A9C047E6FAD55E8B1D86868A885711Verify that docker-credential-pass is installed:
which docker-credential-passIt should show /usr/bin/docker-credential-pass.
Step 8: Start Docker Desktop
Section titled “Step 8: Start Docker Desktop”As your regular user (not root), start Docker Desktop:
systemctl --user start docker-desktopCheck that it’s running:
systemctl --user status docker-desktopStep 9: Log In to Docker
Section titled “Step 9: Log In to Docker”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.
Step 10: Verify Installation
Section titled “Step 10: Verify Installation”Test that Docker is working:
docker versiondocker run hello-worldOptional: Enable Docker Desktop on Startup
Section titled “Optional: Enable Docker Desktop on Startup”To automatically start Docker Desktop when you log in:
systemctl --user enable docker-desktopTroubleshooting
Section titled “Troubleshooting”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
passis 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