runner (docker executor) fails running job because repository container is not reachable
I have been following the instructions to install gitlab and gitlab-runner as docker containers. I have succeded in registering the runner. Using that runner for my jobs fails with:
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab/group/project.git/': Could not resolve host: gitlab
I assume the problem is that the docker
executor creates job containers attached to a different network as the gitlab
container. I have tried forcing the network with --docker-network-mode gitlab_default
, to no avail.
I have a more detailed description in stackoverflow.