Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xjxjin opened this issue Jun 11, 2024 · 5 comments
Open

Comments

@xjxjin
Copy link

xjxjin commented Jun 11, 2024

我执行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
Copy link
Contributor

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

@Cp0204
Copy link

Cp0204 commented Jun 11, 2024

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

其实我建议的解决路线是把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
Copy link

我看了一下有判断用户地区,中国用户运行 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
Copy link

Cp0204 commented Jun 18, 2024

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

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

以下是 casa 的代码片段

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

@Marrrrrrrrry
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants