【已解决/使用问题】内网构建Python失败,提示Requested runtime (python-3.6.6) is not available for this stack

问题:
应用无法构建,使用的是 rainbond 的 Python demo
场景:
1. 离线安装好 rainbond,
2. 服务器在公司内网,不能连接外网下载依赖包。
3. 内网有 Docker、pip 镜像源
估计:
构建应用时,rainbond 需要从外网下载依赖包搭建环境

请完善如下信息,方便我们协助排查问题:

Rainbond版本:
Rainbond grctl v5.1.8-release-bffee0f-2019-10-23-08
操作系统:
Ubuntu 16.04.6 LTS
内核版本:
4.15.0-72-generic
环境:
单台服务器
节点配置:
安装类型:
离线安装
如何复现:
尝试解决:
修改 /opt/rainbond/rainbond-ansible/Dockerfile ,加入公司的 Docker 镜像源
相关截图:

日志打印:
CodeVersion:2d97fe3 Author:WiLson Commit:python demo
Start compiling the source code
Start pull source code from https://…(省略内网网址)…/hello_word.git
Build app version from source code start
builder:-----> Prepare Handle Language Python RuntimeVersion python-3.6.6
builder: ! Requested runtime (python-3.6.6) is not available for this stack (cedar-14).
builder:-----> Installing python-3.6.6
builder: Using supported version of Python 3.6 (python-3.6.6)
建议查看日志定位代码错误
builder:-----> Detection Python runtime python-3.6.6
Build app version from source code failure,Run build return 1
Compiling the source code failure
builder:-----> Prepare Handle python-3.6.6 Success

是否重新执行安装:

集群或应用问题额外需要提供如下信息:

  1. 集群是否正常(grctl node list)
    ±-------------------------------------±-------------±---------±-----------------------±--------+
    | Uid | IP | HostName | NodeRole | Status |
    ±-------------------------------------±-------------±---------±-----------------------±--------+
    | c600dce9-dc82-4e1f-adf4-be36fac4818f | 192.168.3.27 | szdev-PC | manage,compute,gateway | running |
    ±-------------------------------------±-------------±---------±-----------------------±--------+

抄送: @barnett

生成环境变量:
BUILD_DEBUG_INFO=true
BUILD_DEBUG=1
重新构建,观察报错附近的日志信息

构建过程的打印如下,好像安装 python-3.6.6 需要从外网下载安装包,但公司无法访问外网

builder:-----> Detection Python runtime python-3.6.6

  • TYPE=online
  • echo python-3.6.6
  • selected_buildpack=heroku-buildpack-python
  • Save_Deps Python ‘’
  • /tmp/buildpacks/heroku-buildpack-python/bin/compile /tmp/build /tmp/cache
    ++ echo Python
  • ensure_indent
    ++ tr A-Z a-z
  • [[ ‘’ == - ]]
  • read line
    builder: Using supported version of Python 3.6 (python-3.6.6)
  • output_redirect
  • [[ /tmp/slug/20191210132619.tgz == - ]]
    builder:-----> Installing python-3.6.6 from http://lang.goodrain.me/python/cedar-14/runtimes/python-3.6.6.tar.gz
  • read line
    Compiling the source code failure
    Build app version from source code failure,Run build return 1
    builder: ! Requested runtime (python-3.6.6) is not available for this stack (cedar-14).
  • [[ /tmp/slug/20191210132619.tgz == - ]]
  • [[ ! Requested runtime (python-3.6.6) is not available for this stack (cedar-14). == --* ]]
  • [[ -----> Installing python-3.6.6 from http://lang.goodrain.me/python/cedar-14/runtimes/python-3.6.6.tar.gz == --* ]]
  • output_redirect
  • echo ‘builder:----->’ Installing python-3.6.6 from http://lang.goodrain.me/python/cedar-14/runtimes/python-3.6.6.tar.gz
  • echo 'builder: ’ ‘! Requested runtime (python-3.6.6) is not available for this stack (cedar-14).’
  • [[ /tmp/slug/20191210132619.tgz == - ]]
  • read line
  • output_redirect
    建议查看日志定位代码错误
  • sed -e ‘s/–> /–> /’
  • [[ Using supported version of Python 3.6 (python-3.6.6) == --* ]]
  • echo 'builder: ’ ‘Using supported version of Python 3.6 (python-3.6.6)’

的确如你所说,使用源码构建功能的时候是需要公网访问的。
会到我们官方的对象存储里拉取python安装包。
这里提供一个文档给你,是基于java语言的,希望你能得到一些启发,制作python离线构建所需的资源服务。
https://www.rainbond.com/docs/advanced-scenarios/devops/offline-java-build/