Install docker on CentOS _base China

yum remove docker-ce docker-ce-cli containerd.io // 卸载docker

yum install -y yum-utils // 扩展和增强 yum 包管理器

# 配置docker安装源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

# install docker(latest version)
yum install -y docker-ce docker-ce-cli containerd.io

# start
systemctl enable docker --now

# modify default mirror to Ali mirror reference --> https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://zitcfxmp.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

 

posted @ 2023-10-09 17:11  Ashe|||^_^  阅读(8)  评论(0编辑  收藏  举报