全球主机交流论坛

标题: 国内服务器如何安装DOCKER? [打印本页]

作者: 黄局长    时间: 2023-11-10 16:22
标题: 国内服务器如何安装DOCKER?
大佬你们都懂的,国内现在都访问不了DOCKER 有什么办法挂国内源安装?
作者: Debians    时间: 2023-11-10 16:24
国内这么多镜像
作者: 黄局长    时间: 2023-11-10 16:25
Debians 发表于 2023-11-10 16:24
国内这么多镜像

给个网站教程看看
作者: xftaw    时间: 2023-11-10 16:25
https://www.runoob.com/docker/docker-mirror-acceleration.html



小尾巴~~~~~

要不要看看我的探针qwq>>>>>

看签名>>>
作者: jqbaobao    时间: 2023-11-10 16:26
黄局长 发表于 2023-11-10 16:25
给个网站教程看看

一、CentOS 7使用阿里源实现Docker安装
官方库的Repo可能出现不能拉Docker镜像的BUG(404)所以这里我用阿里源
yum remove -y docker  docker-common docker-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
yum -y install docker-ce
systemctl start docker
systemctl enable docker
1.1 Debian使用阿里源实现Docker安装
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable"
#或者 直接
echo "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list
apt update -y
apt install docker-ce -y
systemctl start docker
systemctl enable docker
1.2 Ubuntu 22使用阿里源实现Docker安装
apt update -y
apt install -y apt-transport-https ca-certificates curl software-properties-common
add-apt-repository "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
#或者 直接
echo "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list
apt update -y
apt install docker-ce -y
systemctl start docker
systemctl enable docker
作者: 三月七    时间: 2023-11-10 16:26
wget -qO- https://get.docker.com/ | bash

其实用它这个自动脚本,多来几遍怎么都能装上。不行就配置个shell代理:

export https_proxy="socks5://127.0.0.1:1080"

export http_proxy="socks5://127.0.0.1:1080"

然后再用他的脚本装
作者: rbc    时间: 2023-11-10 16:26
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
作者: 伊吹風子    时间: 2023-11-10 16:28
7楼正解,安装完后再换个阿里云的docker镜像源就一切正常了。
作者: 黄局长    时间: 2023-11-10 16:30
先谢谢楼上的几位大佬了




欢迎光临 全球主机交流论坛 (https://loc.516000.xyz/) Powered by Discuz! X3.4