Cannot use host network in docker build

I’m using gitlab CI, with gitlab-runner (10.5) hosted on a private server. During the build I need to connect to a mySQL server running on the host machine (outside the docker container).

Running a docker container, I can add the --net=“host” flag, and executing gitlab-runner manually I can add the --docker-network-mode=“host” flag. Both of these work how I’d expect, but I can’t find any way to configure this for the automatic builds?