If you try to set network_mode = host
in the config for docker executor, you will get an error about conflicting options hostname and network mode:
level=error msg="Handler for POST /v1.18/containers/create returned error: Conflicting options: hostname and the network mode"
Sample config:
concurrent = 1
check_interval = 0
[[runners]]
name = "artem-test-runner"
url = "<--URL-->"
token = "<--TOKEN-->"
executor = "docker"
[runners.docker]
tls_verify = false
image = "ruby:2.1"
privileged = false
disable_cache = false
volumes = ["/cache"]
network_mode = "host"
Closes: gitlab-org/gitlab-ci-multi-runner#903