Skip to content

Aliases for services docker images

We're really enjoying using GitLab CI with the container registry feature. However, we are struggling to use the "services" feature with our internally-defined docker images (from the GitLab container registry and another registry).

We need to be able to use services where the image names are long and complicated, e.g.:

job:
    image: git.example.com:9999/group/project-a:latest
    services:
        - other-registry.example.com:9999/group/project-b:1.0
        - git.example.com:9999/group-b/project-c:develop

It would really help if we could specify network aliases for each of these services (docker-compose allows something like this) e.g.:

job:
    image: git.example.com:9999/group/project-a:latest
    services:
        - backend:git.example.com:9999/group/project-b:1.0
        - db:git.example.com:9999/group-b/project-c:develop
    script:
        - curl http://backend
        - curl http://db