The docker English website: docs.docker.com/engine/inst… Tencent cloud docker cloud.tencent.com/developer/s development manual…
Procedure 1 Check the Linux image version
cat /etc/redhat-release
2 Install required software packages
Yum-utils provides the yum-config-manager utility, while device-mapper-persistent-data and LVM2 require devicemapper to store drivers.
yum install -y yum-utils device-mapper-persistent-data lvm2
3 Set the stable mirror vault
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
4 Install the DOCKER CE
yum -y install docker-ce
5 Start the Docker and view the version
Start: systemctl start docker View the version: docker version
6 Configure image acceleration
6.1 Aliyun Container Image Service Address [Cr.console.aliyun.com/cn-hangzhou…]
6.2 Creating a Directory Write a configuration file and restart the Docker service
mkdir -p /etc/docker
vim /etc/docker/daemon.json
systemctl daemon-reload
systemctl restart docker
Copy the code
6.3 Checking whether the Image Acceleration Configuration is successful
docker info
7 uninstall docker
systemctl stop docker
yum -y remove docker-ce
rm -rf /var/lib/docker
Copy the code