无法访问 www.docker.com 如何安装 docker

Ubuntu

$ apt update && apt install -y ca-certificates curl$ install -m 0755 -d /etc/apt/keyrings$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc$ chmod a+r /etc/apt/keyrings/docker.asc$ echo \  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null$ apt update # 列出可用的版本$ apt-cache madison docker-ce | awk '{ print $3 }'$ apt install -y docker-ce=5:23.0.6-1~ubuntu.22.04~jammy docker-ce-cli=5:23.0.6-1~ubuntu.22.04~jammy containerd.io docker-buildx-plugin docker-compose-plugin

CentOS

$ yum install -y yum-utils$ yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo# 列出可用的版本$ yum list docker-ce.x86_64 --showduplicates | sort -r$ yum install -y docker-ce-23.0.6-1.el8$ systemctl enable docker-ce$ systemctl start docker-ce
评论
暂无评论

登录后可发表评论

点击登录