gitlab-ci add -net = host选项给docker

我开发了一个PHP symfony项目,我使用gitlab。 我想在gitlab上构buildunit testing,为此我使用gitlab-ci.yml文件:

image: php:5.6 # Select what we should cache cache: paths: - vendor/ before_script: # Install git, the php image doesn't have installed - apt-get update -yqq - apt-get install git -yqq # Install mysql driver - docker-php-ext-install pdo_mysql # Install composer - curl -sS https://getcomposer.org/installer | php # Install all project dependencies - php composer.phar install services: - mysql variables: # Configure mysql service (https://hub.docker.com/_/mysql/) MYSQL_DATABASE: hello_world_test MYSQL_ROOT_PASSWORD: mysql # We test PHP5.5 (the default) with MySQL test:mysql: script: - phpunit --configuration phpunit_mysql.xml --coverage-text -c app/ 

它目前无法正常工作,因为我的主机名在Docker容器上没有parsing。

我在这里find了解决scheme: 你如何使docker容器使用主机的/ etc / hosts文件?

我的问题是:我在哪里写-net = host选项?

谢谢。