Private docker registry service hotname

Hello,

I have one instance of gitlab-ci-multi-runner.x86_64 0:9.0.0-1

In my CI project configuration, i need to use my own gitlab private docker registry for database service.

services:

variables:
POSTGRES_DB: fooDatabase
POSTGRES_USER: fooUser
POSTGRES_PASSWORD: pwd
DATABASE_URL: “jdbc:postgresql://foo__foo-postgis/fooDatabase”

Please someaone can tell me what is the the alias hostnames for the service ? (DATABASE_URL)

Thanks

Check this post for the answer: GitLab CI service - #2 by stefanvangastel?

thanks for help.

  1. documentation :

The alias hostnames for the service are made from the image name following these rules:

Everything after : is stripped
Slash (/) is replaced with double underscores (__) - primary alias
Slash (/) is replaced with dash (-) - secondary alias, requires GitLab Runner v1.1.0 or newer

so the host name should be :

private-registry.fr ?

  1. hosts file
    the /etc/hosts inside the service container ?
  1. No the job container just add a cat /etc/hosts command to your jobs script section. That should also give the answer to 1)

Thanks just add a cat /etc/hosts command to jobs script section give me the solution !