Docker Compose unable to communicate

Hi People,

I newly started using Gitlab CICD. I created a dedicated(specific) runner with docker executor using AWS EC2 and am trying to run a job of build and push a docker file, build multiple docker images , and push it to AWS multiple ecr repos. I am using docker-compose for this.
The pipeline seems to work well when i use gitlabs shared runner and the job succeds, but when i do the same with dedicated runner the job is failing at docker-compose build with the error

“docker.errors.DockerException: Error while fetching server API version: HTTPConnectionPool(host=‘localhost’, port=2376): Max retries exceeded with url: /version (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f9a5a9cbc90>: Failed to establish a new connection: [Errno 111] Connection refused’))”

Can somebody help me with this.
Thank you in advance.

Any word on this? Would appreciate a solution or help diagnosing.

Same issue here except running in google cloud.

Working fine:

  • Shared runners: everything works
  • Gcloud runner: Unit tests (docker executor) and pages deployment steps

I get the error for integration tests on the runner I set up: docker executor, docker/compose image, dind service.

I verified that gitlab-runner is in the docker group. Seems like it’s something along those lines.