1. Install the necessary system tools
yum install -y yum-utils device-mapper-persistent-data lvm2
2. Add Docker software source
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3. Install Docker CE
yum install docker-ce
4. Start the Docker service
systemctl start docker
5. Test whether Docker is installed correctly
docker run hello-world