Where Gitlab Runner resolve DNS?


I install gitlab runner into google cloud network.
The gitlab instance is installed into private network, so there are a public ip but you need VPN connection to reach the destination. (Ex : to gitlab.company.example)

So i have installed a VPN. and i have force into /etc/hosts the private network with the domain name
(Ex : gitlab.company.example)
This local range pass to VPN and reach the gitlab instance

Here ping exemple from gitlab-runner instance
# ping gitlab.company.example
PING gitlab.company.example ( 56 data bytes
64 bytes from seq=0 ttl=63 time=16.145 ms
64 bytes from seq=1 ttl=63 time=12.602 ms
64 bytes from seq=2 ttl=63 time=11.998 ms
64 bytes from seq=3 ttl=63 time=14.953 ms

But i don’t know how. gitlab runner try the public IP:
2019-06-04T12:56:48.763387399Z WARNING: Checking for jobs... failed runner=bQHCpMZs status=couldn't execute POST against https://gitlab.company.example/api/v4/jobs/request: Post https://gitlab.company.example/api/v4/jobs/request: dial tcp i/o timeout

The gitlab runner is a docker container and the entrypoint finish by :

ping -c 5 gitlab.company.example
gitlab-runner "$@"

And i see into logs the ping before gitlab-runner lauch go to
So, How Gitlab Runner DNS works ?

PS: into my configuration toml i have add clone_url = “” without change. it try always gitlab.company.example. Bug into gitlab-runner ?

Thanks for your help

I have resolve my problem :

Gitlab-Runner use DNS from Go

Go use the file /etc/nsswitch.conf to know where resolve dns query