用于buildbot的官场停靠容器的文档要求BUILDBOT_CONFIG_URL环境变量指向通过包含master.cfg文件的HTTP访问的.tar.gz文件。
master.cfg文件不是单个文件,而是导入其他文件(如private.py文件),这又该如何工作呢?version: '2'
services:
buildbot:
image: buildbot/buildbot-master:master
env_file:
- db.env
environment:
- BUILDBOT_CONFIG_DIR=config
- BUILDBOT_CONFIG_URL=https://github.com/buildbot/buildbot-docker-example-config/archive/master.tar.gz
- BUILDBOT_WORKER_PORT=9989
- BUILDBOT_WEB_URL=http://localhost:8010/
- BUILDBOT_WEB_PORT=tcp:port=8010
links:
- db
depends_on:
- db
ports:
- "8010:8010"
db:
env_file:
- db.env
image: "postgres:9.4"
expose:
- 5432发布于 2019-09-18 06:11:47
停靠库示例使用此文件作为码头映像的基础:https://github.com/buildbot/buildbot/blob/master/master/Dockerfile
它将以下脚本定义为其入口点:buildbot.sh
在该脚本中,通过下载和解压缩显式处理配置:
until curl -sL $BUILDBOT_CONFIG_URL | tar -xz --strip-components=1 --directory=$B/$BUILDBOT_CONFIG_DIR
并进一步链接为master.cfg文件。因此,总的来说,魔术取决于额外的脚本设置配置文件,以便它匹配典型的设置。
https://stackoverflow.com/questions/57710010
复制相似问题