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

Fixed the actual download address of the packages. #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tao12345666333
Copy link

fix #213

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333
Copy link
Author

@thaJeztah PATL, thanks!

Before the modification, only the mirror was used to download the yum repo file, but the download of the rpm package was still through download.docker.com.

Comment on lines +457 to +466
if [ -n "$mirror" ]; then
case "$mirror" in
Aliyun)
sed -i "s#download.docker.com#mirrors.aliyun.com/docker-ce#g" /etc/yum.repos.d/docker-ce.repo
;;
AzureChinaCloud)
sed -i "s#download.docker.com#mirror.azure.cn/docker-ce#g" /etc/yum.repos.d/docker-ce.repo
;;
esac
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the indentation is using spaces instead of tabs here.

Also wondering if we should repeat the case here, or if we should (e.g.) add a RPM_REPO_URL variable to the existing code higher up;

case "$mirror" in
Aliyun)
DOWNLOAD_URL="https://mirrors.aliyun.com/docker-ce"
;;
AzureChinaCloud)
DOWNLOAD_URL="https://mirror.azure.cn/docker-ce"
;;
esac
(or even re-use DOWNLOAD_URL to always update the docker-ce.repo URL?

And if that variable is set to do the replace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More in general though, I'm a bit unsure if we should keep these mirror options; are they still useful? I recall that support for our CDN's has improved behind the GFW, so perhaps it's no longer needed for "most" situations.

Looking at the mirrors, is the aliyun mirror still operational?

There's also the rootless-install script; which has the URLs hard-coded; https://github.com/docker/docker-install/blob/6580690119f66d3e31b8bc84e7ac9f9e3d68559b/rootless-install.sh

Which adds a bit to my concern if adding extra complexity is worth it, or if we should remove it altogether.

We already have the DOWNLOAD_URL variable (and/or RPM_REPO_URL); if we added the replace for docker-ce.repo, we could remove the switch for these specific mirrors

Will have to check with others what's the desired approach

@wojiushixiaobai
Copy link

Thank you very much. At present, CDN can work normally in some unrestricted areas, http://pub.mirrors.aliyun.com/docker-ce/ Services are no longer available

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

Successfully merging this pull request may close these issues.

What should domestic users do when using get-docker.sh to install docker-ce timeout?
3 participants