from your CentOS 8. If it also does not recognize gitlabteste.cesed.local, then probably there is a problem with your DNS. If you cannot solve it, then you might be willing to use the IP address instead.
hello alexk, thanks for your time for answering me.
So, I did it on the server and inside the runner container and the two managed to ping the domain that I used for gitlab
As @alexk suggested, I think the problem is that your ruby:2.5 container running inside your CI job can’t resolve the .local domain. The container itself (not the CentOS box) is trying to look up the IP of your .local URL but can’t do so without a custom DNS setting.
Can you add the following at the top of your before_script?
So … I changed the gitlab-ci.yml file and added the two lines, just like you told me, but the problem still persists. See the file and some logs that appeared after I added the two lines you asked me for: gitlab-ci.yml and logs
For the domain resolution to work inside the ruby:2.5 container, the IP address for gitlabteste.cesed.local will need to be a Public IP address for it to successfully resolve.
Understand. But the “problem” is that the DNS I use is private and it is pointing to a private IP. And my installation of Gitlab is local, which is for internal use by a development team of the company I work for.I don’t know if still, I would have to do what you told me to solve the problem, or if there is a work around for that or even a definitive resolution
I had this issue too. In my case, I believed I had setup DNS resolution correctly in my k8s cluster, but I had a regression at some point that made any container I booted stop using my private DNS server for domain resolution.
Technically there are configurations for explicitly controlling the DNS of gitlab-runner (Kubernetes executor | GitLab) but…
I’m hoping I don’t need to resort to that and can simply fix my host’s /etc/resolv.conf file to have a single nameserver entry so that coredns picks it up and resolves the matter for all of my pods automatically. As an odd aside, it appears that the moment an alpine container is booted, it won’t be able to use DNS correctly. In my infrastructure tests, I’m using sleep 1 to work around this peculiarity. If I run into intermittent issues with it, I’ll probably want to explicitly configure the runner’s dns using the above link… theres some history with Alpine + DNS + gitlab not working correctly where using Ubuntu became a popular workaround.