How to Install Docker on CentOS 7
This guide provides step‑by‑step instructions for installing Docker Engine on a CentOS 7 system, including removal of any existing Docker packages, adding the Alibaba Cloud yum repository, installing required utilities, starting and enabling the Docker service, and verifying the installation.
Docker is essential, and this article explains how to install it on a CentOS 7 environment.
1. Uninstall any existing Docker packages:
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine2. Install yum-utils to manage repositories:
sudo yum install -y yum-utils3. Add the Docker yum repository (recommended Alibaba Cloud mirror for faster download):
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo4. Install Docker Engine, CLI, and containerd:
sudo yum install -y docker-ce docker-ce-cli containerd.io5. Start Docker service and enable it to start on boot:
sudo systemctl start docker
sudo systemctl enable docker6. Verify the installation by checking the Docker version and detailed information:
docker -v
docker infoAdditional note: The article also includes a daily motivational quote and a recommendation link, but the core content focuses on the Docker installation steps.
Full-Stack Internet Architecture
Introducing full-stack Internet architecture technologies centered on Java
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.