Let’s quick start.
Prepare docker-ce.repo
$ curl -L https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
$ sed -i 's+https://download.docker.com+https://mirrors.ustc.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
$ sed -i 's+$releasever+8+' /etc/yum.repos.d/docker-ce.repo
Install
$ yum install -y docker-ce
Enable system service
$ systemctl enable docker
$ systemctl start docker
Check service status
$ systemctl status docker
The result should show like below. Active status should be running
.
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2024-01-27 16:52:24 CST; 10s ago
Docs: https://docs.docker.com
Main PID: 12132 (dockerd)
Tasks: 7
Memory: 32.7M
CGroup: /system.slice/docker.service
└─12132 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock