GitLab CI/CD pipelines may encounter "Cannot connect to the Docker daemon" errors for a number of causes, including improper Docker configuration, erroneous permissions, or network problems.
Make sure the GitLab Runner-installed machine can reach the port if the Docker daemon is listening on a TCP port. Look into any firewall settings or network problems that might be interfering with the GitLab Runner's ability to establish a TCP connection with the Docker daemon.
The following command can be used to see if the Docker daemon is waiting on a TCP port:
sudo netstat -tlnp | grep docker
If the Docker daemon is not listening on a TCP port, check the Docker daemon configuration file to ensure that the hosts parameter is set correctly.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article