I was using Docker Desktop on my Mac for a long time. Currently Docker desktop causing a huge issues related to starting up. Everytime it needs some tweak to run or uninstall and install it again, that takes several hours to fix every time I start working.
So I started using other Docker Desktop alternative for mac that is Colima (Container on Linux on Mac) installed with the help of the Git link.
And I am using Docker client for Docker runtime by installing it using:
brew install docker
and I have logged in using docker login
via terminal.
The important note here is that all the above configuration works well with Docker Desktop but after uninstalling everything related to docker and start using Colima
.
While I run docker info
I got the following message:
$ docker info
Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Here are few other information that might need:
$ colima version
colima version 0.4.2
git commit: f112f336d05926d62eb6134ee3d00f206560493b
runtime: docker
arch: x86_64
client: v20.10.17
server: v20.10.11
kubernetes
Client Version: v1.24.1
Kustomize Version: v4.5.4
Server Version: v1.23.6+k3s1
Operating System: macOS Monterey
Version: 12.3.1 (21E258)
Any help would be highly appreciated.
3
Answers
After posting the question on StackOverflow I was non stop searching for a solution. Finally it took a day to fixed it (for me). While searching on google I have found a solution in this link.
Basically
Colima
usage$HOME/.colima/docker.sock
, so first I checked if there is anything in the~/.colima
by runningls -la ~/.colima
and I have found thatdocker.sock
is there.So I set up the DOCKER_HOST by running the following command:
$ export DOCKER_HOST="unix://$HOME/.colima/docker.sock"
and then run:
$ docker info
Now it shows everything related to Docker Server :)
I have same problem, because i start colima before install docker, i run
terminal print:
and colima docker worked!
Best is to add
docker-host
in.zshrc
fileNote that in case you uninstall colima, then again install docker-desktop, then just comment above line of
.zshrc
file