Hopefully posting this in the correct forum. The issue relates to accessing a docker container from within a child docker-compose process running in docker:dind instance. I am using a gitlab CI docker executor build with the following architecture.
The official gitlab-ci documentation recommends configuring a postgres instance as a service in .gitlab-cy.yml. CI jobs defined in .gitlab-ci.yml, are able to connect to the postgres instance via the service name, ‘postgres’.
The tusd, minio and listener containers are spawned within a docker-compose process, triggered inside the pytest CI job. The listener container writes information back to the postgres database.
The listener container is unable to communicate with the postgres container using the hostname, ‘postgres’. The hostname is unrecognised. How can the listener container communicate with the postgres database instance?
Do I use the IP address of the postgres container or the shared gitlab-runner? If so, how do I determine the IP address?
Resolved the issue following the advice of @paulxroot. Moved all services into docker-compose file so that they can communicate with each other. This includes the postgres container etc…
Tests are now invoked via docker-compose run command.
Now able to successfully run tests using gitlab-shared runner…