Docker CE Repo Mirrors Usage Guide

Select Mirror

Note: This mirror only provides Docker packages for Debian/Ubuntu/Fedora/CentOS/RHEL, not from DockerHub.

Auto-Install

Docker provides an automated script for configuration and installation, supporting installation on Debian, RHEL, SUSE series, and their derivatives.

The following assumes that:

  • You are the root user, or have sudo privileges, or know the root password.
  • Your system has curl or wget installed.
export DOWNLOAD_URL="https://(Loading...)"
# if curl
curl -fsSL https://get.docker.com/ | sudo -E sh
# if wget
wget -O- https://get.docker.com/ | sudo -E sh

Debian/Ubuntu/Raspbian User

The following content is modified based on the official doc.

If you have previously installed Docker, please uninstall it first.

for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

First, install dependencies.

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg

Trust Docker's GPG key and add the repository.

distribution
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://(Loading...)/linux/debian \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Finally, install.

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Fedora

The following content is modified based on the official doc.

If you have previously installed Docker, please uninstall it first.

sudo dnf remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine

Install dependencies, download the repo file, and replace the software repository address with a mirror site.

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo sed -i 's+https://download.docker.com+https://(Loading...)+' /etc/yum.repos.d/docker-ce.repo

Finally, install.

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

CentOS/RHEL

The following content is modified based on the official doc.

If you have previously installed Docker, please uninstall it first.

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

Install dependencies, download the repo file, and replace the software repository address with a mirror site.

distribution
sudo  yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+https://download.docker.com+https://(Loading...)+' /etc/yum.repos.d/docker-ce.repo

Finally, install.

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Is there an issue? Report via GitHub Issue

Would you like to contribute? Contribution Guide.Source code on GitHub.

All content is provided under the terms of the CC BY-NC-SA 4.0 license, additional terms may also apply.