Skip to content

Docker runner: Services don't connect to each other.

Summary

Docker runner experience networking problem between services. Main job has access to any running service via alias. Services don't have access to each other via alias name.

Steps to reproduce

gitlab-ci.yml

services:
  - name: myrepo/postgres-db:latest
    alias: postgresdb
  - name: myrepo/app:latest
    alias: mainapp

before_script:

tests:
  script:
    - python manage.py test pipes

What is the current bug behavior?

  • My tests access mainapp (it's ok) via http request.
  • Then mainapp tries to access postgress via postgresdb name, but fails.

What is the expected correct behavior?

Any running service should be able to connect to each other via alias name.

I have same configuration running locally via docker-compose with no errors.