—-------------------
version: '2'
services:
gitlab:
image: gitlab/gitlab-ce:latest
ports:
- 443:443
- 9999:80
- 22:22
restart: always
hostname: gitlab.loc
logging:
driver: "json-file"
options:
max-size: "2000k"
max-file: "20"
volumes:
- /home/gitlab/config:/etc/gitlab
- /home/gitlab/logs:/var/log/gitlab
- /home/gitlab/data:/var/opt/gitlab
—-------------------
gitlab-runner стартует тут же
docker ps
f3d94b99a04d gitlab/gitlab-runner:latest "/usr/bin/dumb-init …" 8 minutes ago Up 8 minutes gitlab_gitlab-runner_1
37c2782b1907 gitlab/gitlab-ce:latest "/assets/wrapper" 7 days ago Up About an hour (healthy) 22/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:9999->80/tcp, 0.0.0.0:32768->1342/tcp gitlab_gitlab_1
—------------------—
конфиг gitlab runner
cat config.toml
—------------------—
concurrent = 1
log_level = "warning"
[[runners]]
name = "runner1"
url = "http://gitlab.loc:9999/"
token = "4X-AbPTrhfcM33ZJdtdP"
—----------------------
при попытке зарегистрировать gitlab-runner выдаёт:
gitlab-runner register
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://gitlab.loc:9999
Please enter the gitlab-ci token for this runner:
4X-AbPTrhfcM33ZJdtdP
Please enter the gitlab-ci description for this runner:
[f3d94b99a04d]: runner1
Please enter the gitlab-ci tags for this runner (comma separated):
test,build
Whether to run untagged builds [true/false]:
[false]:
Whether to lock the Runner to current project [true/false]:
[true]:
ERROR: Registering runner... failed runner=4X-AbPTr status=couldn't execute POST against http://gitlab.loc:9999/api/v4/runners: Post http://gitlab.loc:9999/api/v4/runners: dial tcp 10.10.10.250:9999: getsockopt: no route to host
PANIC: Failed to register this runner. Perhaps you are having network problems
—---------------------—
не подскажите в какую сторону рыть?
сначала определись, что ты запускаешь в докере, раннер или гитлаб. У тебя мешанина какая-то, показвыаешь докер-компос с image: gitlab/gitlab-ce:latest, а в выводе docker ps у тебя gitlab/gitlab-runner:latest
Обсуждают сегодня