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

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

Open
w7374520 opened this issue Feb 9, 2021 · 2 comments · May be fixed by #223
Open

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

w7374520 opened this issue Feb 9, 2021 · 2 comments · May be fixed by #223

Comments

@w7374520
Copy link

w7374520 commented Feb 9, 2021

国内用户使用get-docker.sh安装docker-ce超时怎么办?

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

Solution (解决办法):

编辑get-docker.sh文件,大约在437行附近增加一行:

Edit the get-docker.sh file and add a line about 437 lines.

sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo

The additional examples are as follows (增加示例如下):

432                         (
433                                 if ! is_dry_run; then
434                                         set -x
435                                 fi
436                                 $sh_c "$pkg_manager install -y -q $pre_reqs"
437                                 $sh_c "$config_manager --add-repo $yum_repo"
438                                 **sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo**
439 
440                                 if [ "$CHANNEL" != "stable" ]; then
441                                         $sh_c "$config_manager $disable_channel_flag docker-ce-*"
442                                         $sh_c "$config_manager $enable_channel_flag docker-ce-$CHANNEL"
443                                 fi
444                                 $sh_c "$pkg_manager makecache"
445                         )
@wojiushixiaobai
Copy link

wojiushixiaobai commented Feb 28, 2021

阿里云目前已经不再为 docker-ce 提供镜像服务,get-docker.sh 可以直接使用。

以下内容仅供存档,不需要再修改。

(
  if ! is_dry_run; then
    set -x
  fi
  $sh_c "$pkg_manager install -y -q $pre_reqs"
  $sh_c "$config_manager --add-repo $yum_repo"
  if [ -n "$mirror" ]; then
    case "$mirror" in
      Aliyun)
        sed -i '[email protected]@mirrors.aliyun.com/docker-ce@g' /etc/yum.repos.d/docker-ce.repo
        ;;
      AzureChinaCloud)
        sed -i '[email protected]@mirror.azure.cn/docker-ce@g' /etc/yum.repos.d/docker-ce.repo
        ;;
    esac
  fi

  if [ "$CHANNEL" != "stable" ]; then
    $sh_c "$config_manager $disable_channel_flag docker-ce-*"
    $sh_c "$config_manager $enable_channel_flag docker-ce-$CHANNEL"
  fi
  $sh_c "$pkg_manager makecache"
)

@ldsink
Copy link

ldsink commented Jul 13, 2021

sudo ./get-docker.sh --mirror Aliyun

@thaJeztah thaJeztah changed the title 国内用户使用get-docker.sh安装docker-ce超时怎么办? What should domestic users do when using get-docker.sh to install docker-ce timeout? Oct 14, 2024
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 a pull request may close this issue.

3 participants