2017-10-13 5 views
0

Sur un coup-runner gitlab ce dockerized:Pourquoi est-ce que je ne peux pas connecter un coureur gitlab dockerized à un gitlab ci?

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): 
http://localhost:4311 
Please enter the gitlab-ci token for this runner: 
xxxxxxxxxxxx 
Please enter the gitlab-ci description for this runner: 
[runner]: dockerizedrunner 
Please enter the gitlab-ci tags for this runner (comma separated): 
powershell 
Whether to run untagged builds [true/false]: 
[false]: true 
Whether to lock Runner to current project [true/false]: 
[false]: false 
ERROR: Registering runner... failed     runner=xxxxxx status=couldn't execute POST against http://localhost:4364/api/v4/runners: Post http://localhost:4364/api/v4/runners: dial tcp 127.0.0.1:4311: getsockopt: connection refused 
PANIC: Failed to register this runner. Perhaps you are having network problems 

J'ai essayé avec 3 ports redirigés (22,80,443 transmis à 4311,4312,4313). Comment dois-je le configurer?

+0

Comment lancez-vous 'gitlab' et' gitlab-runnet'. Pourriez-vous nous montrer des fichiers 'docker-composer' ou des commandes pour l'exécution de ces conteneurs. –

+0

en fait, je ne docker exécuter gitlab/gitlab-ce et docker exécuter gitlab/gitlab-runner. Puis en kitematic je redirige les ports pour gitlab-ce (22,80,443) – koller23

Répondre

2

Lorsque vous tapez http://localhost:4311 dans gitlab-ci fait localhost se réfère à l'hôte intérieur récipient. Ce n'est pas localhost de votre PC local. Par conséquent gitlab-ci n'a pas pu se connecter à gitlab. Je vous recommande d'utiliser docker-compose pour orchestrer plusieurs conteneurs.