How to Add Docker CE Apt Repository for Debian

April 19, 2017 | By the+gnu+linux+evangelist.

GNU/Linux Debian Docker CE Apt Repository Setup – Step-by-step Guide

Hi! This Tip shows you Step-by-Step How to Setup the Apt Repository for Docker Community Edition Installation on GNU/Linux Debian based OSes.

Docker is a Command-line Program, a background Daemon, and a set of Remote Services that take a Logistical Approach to Solving common Software Problems and Simplifying your experience Installing, Running, Publishing, and Removing Software.

Getting-Started with Docker on Debian is Easy, it’s enough to Install it and then Use the Docker Engine to Create and Manage Containers.

Finally, this Setup is valid for all the Debian-based Distros like:

  • Kali
  • MX Linux
  • Deepin
  • Parrot
  • antiX
  • SparkyLinux
  • Q4OS
  • Netrunner
  • Voyager
  • MakuluLinux
  • Elive
  • LMDE
  • Parsix
How to SetUp the Docker Apt Repository for Debian - Featured
  1. 1. Terminal Getting-Started Guide

    How to Quick-Start with Command Line on Debian GNU/Linux

    Console Debian Linux QuickStart Guide

    First Update the Apt Repo Sources with:

    sudo apt update
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.
  2. 2. Installing Dependencies

    Install Required Packages
    Play:

    sudo apt install apt-transport-https curl ca-certificates gnupg
  3. 3. Adding Docker CE GPG Key

    Import the Docker CE GPG Key
    First, make the Target Directory:

    sudo install -m 0755 -d /etc/apt/keyrings
    And then to Setup it run:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    Last, to fix Permission:
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
  4. 4. Installing Docker CE Repo

    Add the Docker CE Repository
    You have 2 Alternatives: ‘stable’ or ‘nightly’ Channel.
    So for the Stable Release on Debian 8/9/10/11/12 Based OSes play:

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

    For Debian Stable based and Kali Rolling at this Time proceed like this:

    echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "bookworm")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    And for All other Debian-based if uncertain simply try with the above Command.
    In case of Not Found try to then Amend it manually with:
    sudo nano /etc/apt/sources.list.d/docker.list
    And for instance, Change:
    https://download.docker.com/linux/debian sid
    In some Previous release like for instance:
    https://download.docker.com/linux/debian bookworm
    Ctrl+x to Save & Exit from nano ;)
    And then Update the Apt Sources again.
  5. 5. Refreshing Repos

    Last Refresh the Repositories
    Simply run:

    sudo apt update
  6. 6. Docker Getting Started

    Docker Quick Start for Debian Based


QuickChic Theme • Powered by WordPress