3

On a dockerized gitlab-runner bash:

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

I tried this with 3 forwarded ports (22,80,443 forwarded to 4311,4312,4313). How should I set it up?

2
  • How do you run gitlab and gitlab-runnet. Could you show us some docker-compose files, or commands for running this containers. Commented Oct 13, 2017 at 12:13
  • actually I do docker run gitlab/gitlab-ce and docker run gitlab/gitlab-runner. Then in kitematic I forward ports for gitlab-ce (22,80,443) Commented Oct 13, 2017 at 12:17

1 Answer 1

5

When you type http://localhost:4311 in gitlab-ci actually localhost refers to host inside container. This is not localhost of your local PC. Therefore gitlab-ci could not connect to gitlab.

I recommend you to use docker-compose to orchestrate several containers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.