timeline of the universe

Sometimes I forget that as a species we’re still in the very infancy of programming, if not earlier than that.


Today I opened my laptop and noticed that some docker containers I usually have running weren’t there. I did what anyone would and tried to docker ps and got this error: Cannot connect to the Docker daemon at unix:///Users/john/.docker/run/docker.sock. Is the docker daemon running?

Whats also weird is I can’t stop Docker using the Menu Bar icon…

Well lets check the dockerd logs and see if it’s trying to tell me something.

dockerd logs

Not really, it looks fine.

At this point I resort to killing docker via kill -15 and then I try to restart it. Except it won’t start now. The Menu Bar icon just shows the little whale with the containers on it’s back and it “spins” forever. Sigh.

Restart my Mac, still doesn’t fix it.

Time to Google.

Most common response I find; remove your ~/.docker/ ok fine, I rename it to .docker.BACKUP and try to start docker again. Nope.

Shit.

Another solution that seemed to help a bunch of people was to manually edit ~/Library/Group\ Containers/group.com.docker/settings.json and disable Kubernetes, which didn’t help.

One thing I can do though is bring up the Docker Desktop Troubleshooting screen, so lets see what that can do for us.

docker desktop troubleshooting page

So since I can actually get to this page lets see if Docker Desktop can fix itself.

I go down the line, Clean/Purge Data, restart. Nope.

Reset to Factory Defaults, restart. Nope.

Uninstall, reinstall. Yup.

That fixed it. Reinstalling it was the fix and I have no clue why. It never complained, never logged anything weird, just stopped working one morning and that was it.

I predict that no one 5,000 years from now will ever have to deal with weird unexplained software bugs, and if you’re reading this thousands of years in the future count yourself lucky :)