I have a private git repo. My runner is on a separate machine, both ubuntu. When I try ping $CI_REGISTRY in the yml file, I see during the build that the $CI_REGISTRY domain name is not resolving to the correct IP address. I need to hit the internal address of the server, not the external address so I set up a hosts file on the host on which gitlab runner is running that has the correct address, but the executor is ignoring it. Oddly, the address it's coming up with is an internal address on the cloudflare network, not the external address for the host I'm trying to reach as I would expect if it was doing a DNS lookup.
How can I either:
- force the docker executor to use the host's hosts file
- pass in an environment variable (or something) that the executor can use to resolve the address correctly