Skip to content
This repository was archived by the owner on Nov 29, 2020. It is now read-only.
This repository was archived by the owner on Nov 29, 2020. It is now read-only.

Docker 安装脚本 BUG Fix #128

@iLemonra1n

Description

@iLemonra1n

请提供如下信息:

  • 安装环境信息(云服务商或者本地虚拟环境,系统版本,内核版本,配置信息等)
  • 安装类型(单机,离线,使用版本信息等)
  • ansible安装日志 (/opt/rainbond/rainbond-ansible/log/)
  • 能否复现,如何复现
  • 如果可以提供相关截图

问题文件:https://github.com/goodrain/rainbond-ansible/blob/devel/roles/docker/install/tasks/online.yml
关联命令:curl -fsSL http://rainbond-pkg.oss-cn-shanghai.aliyuncs.com/releases/docker/install-docker.sh

目前各大镜像源的Debian 10已经更名为Debian Buster,即将原来的

deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian 10 stable
修改为:
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian buster stable

修复方案是将上面提到的 install-docker.sh 中第324行起:

  debian|raspbian)
  	dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
  	case "$dist_version" in
  		9)
  			dist_version="stretch"
  		;;

修改为:

  debian|raspbian)
  	dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
  	case "$dist_version" in
  		10)
  			dist_version="buster"
  		9)
  			dist_version="stretch"
  		;;

也可以通过读取 /etc/os-release 文件中 VERSION_CODENAME 键值,来获取正确的版本名。

或者与上游 ( curl -fsL get.docker.com | bash )保持同步,即可解决此问题

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions