Introduction :
Environment :
- CentOS Linux release 7.9.2009 (Core)
- Client: Docker Engine - Community Version: 20.10.5
- Server: Docker Engine - Community Version: 20.10.5
Installation (text-based installer)
-
Download docker-ce.repo
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
-
Change the sorce to TUNA
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
-
Installating
yum makecache fast
yum install docker-ce
-
start service
systemctl start docker
-
Verify
docker --version
-
e.g
docker run hello-world
If you've seen such this whitch means the docker have succeed run on you system.
image.png
- Some improvements
change the source
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
网友评论