I use a vm machine to host a gitlab by docker. I also host two gitlab-runner by docker at same vm.
I have register two runner to gitlab server. My .gitlab-ci.yml
is at bottom. I want to use dind to build my image.
But I get the error from pipeline job. It looks like it cannot reach my vm’s ip (10.32.78.26).
So I go inside the runner container to ping vm’s ip. It get the response. How could I fix this? Please help me.
Cloning repository...
Cloning into '/builds/project'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@{serverIp}:9090/project.git/': Failed to connect to {serverIp} port 9090: Host is unreachable
ERROR: Job failed: exit code 1
.gitlab-ci.yml
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- docker info
stages:
- config
config:
script:
- docker images
- dcoker ps
stage: config