I was trying to run minikube in ubuntu and the this error was showing up.
Run this command: export DOCKER_HOST=unix:///var/run/docker.sock
This should work properly, I was not able to find the solution and was not able to answer the question(it is locked).
New contributor
Ashran Baig is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.