gpt4 book ai didi

docker - 无法配置/注册 dockerized gitlab runner

转载 作者:行者123 更新时间:2023-12-02 18:07:23 24 4
gpt4 key购买 nike

我正在运行带有 gitlab 的容器.

我也尝试设置 dockerized gitlab runnerthis文章。

首先,我尝试通过以下方式运行 gitlab runner:

docker run -d --name gitlab-runner --restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest

日志 说:
...
Listen address not defined, session server disabled builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory builds=0
...

我还尝试了 this 的注册运行者文章:
docker run --rm -t -i -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register

5步后:
Please enter the gitlab-ci tags for this runner (comma separated):
my-tag,another-tag

我得到错误:
ERROR: Registering runner... failed                 runner=KuwydETA status=couldn't execute POST against http://localhost/api/v4/runners: Post http://localhost/api/v4/runners: dial tcp 127.0.0.1:80: getsockopt: connection refused
PANIC: Failed to register this runner. Perhaps you are having network problems

最佳答案

在/srv/gitlab-runner/config 目录中,您需要插入 config.toml 文件。
访问:https://docs.gitlab.com/runner/examples/gitlab.html
https://docs.gitlab.com/runner/configuration/advanced-configuration.html

关于docker - 无法配置/注册 dockerized gitlab runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54388962/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com