0
GitLab目前给定主机容器上运行,我试图建立GitLab亚军同一台主机上的另一个容器:问题连接GitLab亚军与GitLab
GitLab脚本(GitLab version: 9.3.9
):
[[email protected] gitlab_runner]# cat gitlab.sh
#!/bin/bash
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 2222:22 \
--name gitlab \
--restart always \
--volume /mnt/data/gitlab/config:/etc/gitlab \
--volume /mnt/data/gitlab/logs:/var/log/gitlab \
--volume /mnt/data/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
GitLab亚军脚本:
[[email protected] gitlab_runner]# cat gitlab_runner.sh
docker run --name gitlab-ci-multi-runner -d --restart=always \
--volume /mnt/data/gitlab/gitlab-runner:/home/gitlab_ci_multi_runner/data \
--env='CI_SERVER_URL=http://gitlab/ci' --env='RUNNER_TOKEN=6cE9HefxGFfbAdadS4eT' \
--env='RUNNER_DESCRIPTION=runnerA' --env='RUNNER_EXECUTOR=shell' \
--link gitlab \
sameersbn/gitlab-ci-multi-runner:1.1.4-7
GitLab上HTTPS运行。
现在,当我尝试运行gitlab_runner.sh
,我得到以下错误:
ERROR: Registering runner... failed runner=6cE9Hefx
status=couldn't execute POST against http://gitlab/ci/api/v1/runners/register.json:
Post http://gitlab/ci/api/v1/runners/register.json:
dial tcp 172.17.0.2:80: getsockopt: connection refused
PANIC: Failed to register this runner. Perhaps you are having network problems
我可以看到172.17.0.2
是GitLab IP只能作为牧场主UI如下图所示:
是在HTTPS运行gitlab? –
是的。它仅适用于HTTPS,而且是CA签名的,不是自签名的。 – Technext
不应该那么URL是'https:// gitlab/ci /'? –