gitlab ci error could not translate host name "postgres" to address: Name does not resolve

EDIT: This was an intended change to the images, you now must set a password or configure further:

If you know that you want to be insecure (i.e. any one can connect without a password from anywhere), then POSTGRES_HOST_AUTH_METHOD=trust is how you opt in to that.


This seems to have been introduced when the docker images were upgraded to the new releases.

You can pull the 10.11 image instead to avoid this problem for the time being:

services:
- postgres:10.11

Not sure why this is happening, but we are experiencing the same since the last docker image update. I have found this to also be the case going from 12.1 to 12.2.


postgres has two required environment variables names POSTGRES_USER and POSTGRES_PASSWORD if you not provide them container will not run.

gitlab-ci documentation about services