flyctl cannot find local docker instance

Ok I’ve figured it out.

Running docker context ls shows:

which is as expected, but unix:///var/run/docker.sock does not exist.
Turns out that Docker for Mac does not create a symlink anymore to the default endpoint, at least for fresh installs. Since v4.15 it doesn’t run as root anymore, so it doesn’t have permissions to create this symlink.

In the docker docs it’s written, I’ve simply added the symlink and now it works correctly.

It might make sense for flyctl to check both locations, or at least include this in the flyctl docs, as Docker Desktop starts automatically on the desktop-linux context and creates the socket in the user directory where it can write.

2 Likes