IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
24.57k stars 1.33k forks source link

国内已经无法按照脚本安装docker,有考虑优化安装策略么 #1868

Open xjxjin opened 2 months ago

xjxjin commented 2 months ago

我执行curl -fsSL https://get.docker.com | bash
提示 curl: (7) Failed to connect to get.docker.com port 443 after 60247 ms: Connection refused

目前看网上有安装方法

## 设置秘钥
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

## 增加软件源
 sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"

## 安装docker
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

有考虑按照这种方式安装docker么

jerrykuku commented 2 months ago

可以参考下你给的方案,我们先测试下。感谢建议。

Cp0204 commented 2 months ago

先为分享点赞,这个的方案可以解决部分问题,不过在某些系统环境可能有兼容性问题哦。

其实我建议的解决路线是把get.docker.com安装脚本拉下来到casaos alioss,从oss加载例如get_docker.sh

现在的casaos安装脚本有判断是否国内网络环境,以从alioss提供包,只要在docker安装代码处判断国内就可以,成本更低。 如图

Screenshot_2024-06-12-00-54-34-939_com mmbox xbrowser-edit

Marrrrrrrrry commented 2 months ago

我看了一下有判断用户地区,中国用户运行 https://play.cuse.eu.org/get_docker.sh 即可

这个脚本含有阿里云中国和azure中国的镜像站 https://mirrors.aliyun.com/docker-ce/ https://mirror.azure.cn/docker-ce/

以下是 casa 的代码片段

#Install Docker Install_Docker() { Show 2 "Install the necessary dependencies: \e[33mDocker \e[0m" if [[ ! -d "${PREFIX}/etc/apt/sources.list.d" ]]; then ${sudo_cmd} mkdir -p "${PREFIX}/etc/apt/sources.list.d" fi GreyStart if [[ "${REGION}" = "China" ]] || [[ "${REGION}" = "CN" ]]; then ${sudo_cmd} curl -fsSL https://play.cuse.eu.org/get_docker.sh | bash -s docker --mirror Aliyun else ${sudo_cmd} curl -fsSL https://get.docker.com | bash fi ColorReset if [[ $? -ne 0 ]]; then Show 1 "Installation failed, please try again." exit 1 else Check_Docker_Install_Final fi }

Cp0204 commented 2 months ago

我看了一下有判断用户地区,中国用户运行 https://play.cuse.eu.org/get_docker.sh 即可

这个脚本含有阿里云中国和azure中国的镜像站 https://mirrors.aliyun.com/docker-ce/ https://mirror.azure.cn/docker-ce/

以下是 casa 的代码片段

这个链接是我做的镜像😂,issue提出时还未优化,目前采用了我的方案暂时过渡

Marrrrrrrrry commented 2 months ago

这个链接是我做的镜像😂,issue提出时还未优化,目前采用了我的方案暂时过渡

怪不得我觉得奇怪,怎么用 eu.org 的域名

zsio commented 2 weeks ago

我试了一下,已经失效了

DeeplearnerAlex commented 1 week ago

为什么我挂了梯子还是有这个问题