0

I will try to summarize my problem as accurately as possible. I have to install Gitlab on a machine that has CentOS 8 and install it as a docker container. So far everything was going well, I was able to install the gitlab and runner container, and I was in no way able to make the runner run any jobs. Jobs were stuck without being executed properly

Initially the problem was because the tags were missing from the gitlab-ci.yml file, I fixed this, but another problem appeared that was the containers created by the runner were unable to resolve the DNS in order to download the necessary dependencies to run the two jobs within the file above mentioned. This is the error that appeared:

Job error

So I decided to create a daemon.json file with only one DNS configuration, but after that the problem of jobs getting stuck returned. I deleted the file and restarted the machine, but the problem persisted. So I used dockerd to set the DNS and when I tried to execute the command dockerd --dns "server ip", this error appeared:

dockerd error

For further clarification, I am using gitlab with a domain created inside the company's DNS server and both use private IP, since access to gitlab will be done only internally. And follow the gitlab-ci.yml file in case anyone wants to see if there are any problems.

gitlab-ci.yml

Ps .: I can communicate between the containers and from each one I can ping the DNS server on which the gitlab domain was created. Thanks in advance to anyone who can help me with this issue

  • Did you trying start gitlab-runner container with pointing the dns to your company's DNS server? `docker run` with `--dns` option. – mariaczi Oct 28 '20 at 13:53
  • Yes, I did. I ran this especific command: `docker run --dns "dns server" --add-host gitlabteste.cesed.local:"gitlabserver" --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner:alpine-bleeding register` – Sezinando Vieira Oct 28 '20 at 14:47

0 Answers0