yum install -y epel-release
yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://docker.imgdb.de",
"https://docker-0.unsee.tech",
"https://docker.hlmirror.com"
]
}
EOF
systemctl daemon-reload
systemctl restart docker
ubuntu 安装docker
apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release
#安装必要支持
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#安装阿里gpg key
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#安装apt源
apt update
#更新源
docker version
systemctl status docker
本文介绍了如何通过yum命令安装yepel-release和yum-utils,添加Docker仓库,配置Dockerdaemon.json以使用Qiniu镜像源,最后重启docker服务。
1766

被折叠的 条评论
为什么被折叠?



