Docker login to AWS ECR from GitLab CI fails with "dial tcp: lookup docker on x.x.x.x:53: no such host" when pulling docker:dind from ECR

Solution 1:

To resolve this problem just add on /etc/gitlab-runner/config.toml a volume map to docker sock.

volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]