51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

【Linux 系列】Docker-Build 在线地址错误异常解决

前言: {#前言:}

最近需要使用到一款国产时序数据库 IOTDB, 按照官网操作文档指引进行安装,出现 Docker-build 在线地址异常, 所以记录下。

系统环境 {#系统环境}

操作系统:CentOS Linux 7 (Core)

Docker : version 20.10.9

git : version 2.30.1[出现问题的版本是 1.8.3]

异常信息: {#异常信息:}

[root@mobai local]# docker build -t iotdb:base git://github.com/apache/incubator-iotdb#master:docker
unable to prepare context: unable to 'git clone' to temporary context directory: error initializing submodules: usage: git submodule

这个问题后来查到是由于 git 版本太老导致的。

低于 2.10 的 git 不支持--depth 参数。总之,升级你的 git, 原文地址:How to make shallow git submodules? - Stack Overflow

  • 原来安装 git 的命令
$ yum install -y git
$ git --version
=======1.8.3
  • 重新安装
$ yum remove git
$ yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
$ yum install git

如上即可。

赞(4)
未经允许不得转载:工具盒子 » 【Linux 系列】Docker-Build 在线地址错误异常解决