Official reference address: https://docs.docker.com/install/linux/docker-ce/centos/
Download: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
• Setting the Locale
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile
source /etc/profile
• uninstall the old version
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
• install the necessary kit
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
• Adding information source software
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
• Installation docker-ce
sudo yum install docker-ce docker-ce-cli
Here, if the following error y:
Error: Problem: Package Penalty for Docker-ce-3: 19.03.6-3.el7.x86_64 The requires containerd.io> = 1.2.2-3, But none of Providers at The CAN BE installeddnf install
# to enter the address of the official website to download the latest version of view, install the latest version containerd.io
DNF install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
• Start docker service
sudo systemctl start docker
• boot
sudo systemctl enable docker
• View version
docker --version