1. Installation
yum install -y docker
2. Start the Docker service
systemctl start docker.service
3. View the installed version
docker version
4. Set the boot to start
systemctl enable docker.service
5. Configure Docker image download acceleration
After the default installation of the Docker environment, the speed of pulling the Docker image is slow
Edit the configuration file directly:
vim /etc/docker/daemon.json
Add the source address of the accelerated image (such as Netease) to it:
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
After configuring the acceleration address, reload the configuration file
systemctl daemon-reload
Restart the docker service
systemctl restart docker.service
6. Common domestic mirror sources
Docker中国官方镜像加速
--registry-mirror=https://registry.docker-cn.com
网易163镜像加速
--registry-mirror=http://hub-mirror.c.163.com
中科大镜像加速
--registry-mirror=https://docker.mirrors.ustc.edu.cn
阿里云镜像加速(需要注册账号后使用)
--registry-mirror=https://{your_id}.mirror.aliyuncs.com
daocloud镜像加速(需要注册账号后使用)
--registry-mirror=http://{your_id}.m.daocloud.io