extra_hosts docker config doesn't seem to work properly
I use a docker executor to run CI builds. Because of a routing issue on my local network the domain isn't resolved properly and the data is routed to the incorrect device. In order to fix this I add manual entries in the /etc/hosts file. I modified the config.toml and set the extra_hosts parameter to account for these entries.
extra_hosts = ["domain.net:192.168.1.x", "my.domain.net:192.168.1.x"]
However, when a new build is run it still fails:
gitlab-ci-multi-runner 1.2.0 (3a4fcd4)
Using Docker executor with image my.domain.net:5008/account/project:latest ...
Pulling docker image my.domain.net:5008/account/project:latest ...
Running on runner-44e7f193-project-5-concurrent-0 via domain.net...
Cloning repository...
Cloning into '/builds/account/project'...
fatal: unable to access 'https://gitlab-ci-token:xxxxxx@my.domain.net/account/project.git/': Failed to connect to my.domain.net port 443: Connection refused
This error occurs because it still routes to the incorrect device.
If I manually start the image and modify the /etc/hosts file it works (or if I start docker with the --add-hosts flag).
I am using Docker version 1.11.
Is there any way to see how the gitlab-runner starts the image so I can see if it sets the correct flags?