YouTip LogoYouTip

Debian Docker Install

# Debian Docker Installation Docker supports the following 64-bit Debian versions: * Debian Bookworm 12 (Stable) * Debian Bullseye 11 (Old Stable) Supported architectures include x86_64 (amd64), armhf, arm64, and ppc64le. ### Uninstall Old Versions If you have previously installed Docker Engine, you need to uninstall the old version to avoid conflicts: for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done * * * ## Automatic Installation Using Official Installation Script The installation command is as follows: curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh * * * * * * ## Manual Installation ### 1. Update Packages First, update existing packages and the package cache: sudo apt update sudo apt upgrade ### 2. Install Dependencies Install some necessary dependencies that allow apt to use the HTTPS protocol to access the Docker repository: sudo apt install apt-transport-https ca-certificates curl software-properties-common ### 3. Add Docker Official GPG Key Use the following command to add Docker's official GPG key: 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 ### 4. Add Docker Repository Add Docker's official APT software source: 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# Update sudo apt-get update ### 5. Update APT Package Cache After adding the repository, update the APT package index: sudo apt update Ensure you are now installing Docker from the official Docker repository instead of the default Debian repository: apt-cache policy docker-ce You should see it pointing to https://download.docker.com/, confirming this is the official Docker repository. ### 6. Install Docker Now, you can install Docker: sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ### 7. Start and Verify Docker Start Docker and set it to start on boot: sudo systemctl start docker sudo systemctl enable docker You can use the following command to verify if Docker is installed successfully: sudo docker --version Run the following test command to ensure Docker is working properly: sudo docker run hello-world ### Uninstall Docker Remove the installation packages: sudo apt-get purge docker-ce Remove images, containers, configuration files, etc.: sudo rm -rf /var/lib/docker
← Docker RepositoryLinux Comm Groupadd β†’