-1

I've just started to use docker and got an error. I use Pycharm on macOS. In my project I clone a github repo (that's a simple LogisticRegression from sklearn) that includes dockerfile. I expected, that all what I needed was

docker build . -t servername

But I got an error

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Where should i run Docker daemon? Thank you for your help!

Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
  • Vote to close as this is likely a duplicate of https://stackoverflow.com/questions/44084846/cannot-connect-to-the-docker-daemon-on-macos?rq=1 – astrochun Jun 12 '22 at 15:30
  • Does this answer your question? [Cannot connect to the Docker daemon on macOS](https://stackoverflow.com/questions/44084846/cannot-connect-to-the-docker-daemon-on-macos) – wovano Jun 15 '22 at 15:06

2 Answers2

1

You need to install and run Docker first. Here is the Link for Docker Desktop for MacOS.

eega
  • 479
  • 8
  • 20
0

Run it with sudo so sudo docker build . -t servername

else try sudo systemctl enable docker.service && systemctl enable containerd.service