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:

    name = "name"
    url = "giturl"
    token = "token"
    executor = "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?

  • Give multiple tags to docker image using one docker tag command
  • mounting external drives to a Docker container
  • Access host filesystem in the docker compose command
  • How to refer to directory contains Dockerfile in building?
  • How to install python2.6 in alpine container?
  • How to share a value between all docker containers spun op by the same “docker-compose up” call?
  • Graylog SMTP server without TLS/SSL
  • How to handle database storage/backup and application logs with many linked containers?
  • How to launch a Docker container that i've got from another person?
  • Running python web app from docker
  • Docker for Windows can't reach the database in Windows 10 enterprise evaluation
  • starting container using docker API
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.