当前位置:   article > 正文

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

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/931783
推荐阅读
相关标签
  

闽ICP备14008679号