Running docker gitlab-runner with net=host option

I’ve also been having enormous problem setting up docker gitlab-runner containers with net=”host” option. Even though in version 1.1 option “docker-network-mode” was introduced I cannot make it work. My config.toml in gitlab-runner container is:

[[runners]]
    name = "name"
    url = "giturl"
    token = "token"
    executor = "docker"
    [runners.docker]
      tls_verify = false
      image = "maven:3.3.9-jdk-8"
      network_mode = "host"
      privileged = false
      disable_cache = false
      volumes = ["/cache"]

and runner does not work with net=host mode. Anyone made it work?

  • Proper Docker Setup for Multiple Websites
  • Kubernetes + MySQL : Creating custom database and user in a Kubernetes container
  • @EnableDiscoveryClient spring Boot service registration
  • Add xserver into Docker container (the host is headless)
  • docker_compose v2 volume container
  • How does coreos compare to triton?
  • Mount Docker volume on host but make files “immutable”?
  • docker multiply hostnames for one container
  • Using docker environment -e variable in supervisor
  • SSH into a DC/OS created public agent node to deploy a Docker container?
  • Spring Boot in Docker
  • Run installation command in an already existing docker image (not container)?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.