Skip to content

docker executor: use DNS, DNSSearch and ExtraHosts settings from configuration

What does this MR do?

This MR changes service container instantiation to set DNS, DNSSearch and ExtraHosts configuration, as already done for the regular containers.

Why was this MR needed?

Due to various reasons, for example when gitlab and it's registry are reachable internally and externally from different IP adresses, users might want to set custom DNS servers, DNS search domains and extra hosts in their gitlab runner configuration.

This setting wasn't applied to services specified in the .gitlab-ci.yml, for example leading to connection failures/timeouts when using docker:dind to build and push images to GitLab's registry.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated (prepared branch for gitlab-ce project)
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased - no conflicts

What are the relevant issue numbers?

Edited by Florian Klink

Merge request reports