ko
ko copied to clipboard
ko build -L on Mac with Docker desktop fails contacting Docker daemon
Getting "2024/07/22 15:52:50 daemon.Write response: Error: failed to publish images: error publishing ko://github.com/otomato/myapp: error loading image: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
The reason for that is that the Docker socket for MacOS is at ~/Library/Containers/com.docker.docker/Data/docker.raw.sock
So the simple fix for this is running sudo ln -s ~/Library/Containers/com.docker.docker/Data/docker.raw.sock /var/run/docker.sock
but it took me a few days to look into this and fix it. Would be nice if this was taken care of automatically.