When using GitLab CI, as well as the gitlab-ci-multi-runner, I\'m unable to get internally-started Docker containers to expose their ports to the \"host\", whic
The offical gitab-ci on gitlab.com documentation refers to the example of PostgreSQL
Its working CI does not try to connect to localhost, but rather to the service name
The
serviceskeyword defines just another docker image that is run during your build and is linked to the docker image that the image keyword defines. This allows you to access the service image during build time.The service container for MySQL will be accessible under the hostname
mysql.
So, in order to access your database service you have to connect to the host namedmysqlinstead of a socket orlocalhost.
You could check if this applies in your case, and try accessing your application service in app:9143 instead of localhost:9143.