全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 1881|回复: 13
打印 上一主题 下一主题

国内服务器如何安装DOCKER?

[复制链接]
跳转到指定楼层
1#
发表于 2023-11-10 16:22:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大佬你们都懂的,国内现在都访问不了DOCKER 有什么办法挂国内源安装?
来自 7#
发表于 2023-11-10 16:26:34 | 只看该作者
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

点评

50CM 的大佬就是 硬跟长  发表于 2023-11-10 16:35
2#
发表于 2023-11-10 16:24:18 来自手机 | 只看该作者
国内这么多镜像
3#
 楼主| 发表于 2023-11-10 16:25:38 | 只看该作者

给个网站教程看看
4#
发表于 2023-11-10 16:25:54 | 只看该作者
https://www.runoob.com/docker/docker-mirror-acceleration.html



小尾巴~~~~~

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

看签名>>>
5#
发表于 2023-11-10 16:26:11 | 只看该作者
黄局长 发表于 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

点评

谢谢50CM 长JJ的大佬  发表于 2023-11-10 16:42
谢谢50CM 长JJ的大佬  发表于 2023-11-10 16:39
6#
发表于 2023-11-10 16:26:33 | 只看该作者
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"

然后再用他的脚本装

点评

谢谢50CM 长JJ的大佬  发表于 2023-11-10 16:40
8#
发表于 2023-11-10 16:28:18 | 只看该作者
7楼正解,安装完后再换个阿里云的docker镜像源就一切正常了。

点评

谢谢50CM 长JJ的大佬  发表于 2023-11-10 16:43
9#
 楼主| 发表于 2023-11-10 16:30:41 | 只看该作者
先谢谢楼上的几位大佬了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-22 00:43 , Processed in 0.063327 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表