HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

ctop does not work with latest version of docker: Get "http://unix.sock/info": dial unix /var/run/docker.sock: connect: no such file or directory

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
vardirectoryinfosockhttprunfileversiongetwork

Problem

I am very fond of ctop, a command-line manager for docker containers. I recently upgraded my docker to v23.0.5 on mac OSX Ventura 13.4 (Intel chip). After doing so, and running ctop, I get the daemon erroring out with this message:

Get "http://unix.sock/info": dial unix /var/run/docker.sock: connect: no such file or directory

I checked and it is indeed true that there is no docker.sock there with the new version of docker. Checking another machine running docker v20, docker.sock is right there in that location. I figured maybe with the new version, that file has a new home. I did manage to find a docker.sock at Users/sethlutske/.docker/run/docker.sock, so I set the environment variable export DOCKER_HOST=/Users/sethlutske/.docker/run/docker.sock as recommended in the ctop docs on customization, but then running ctop gives me another error:

Get "tcp:///Users/sethlutske/.docker/run/docker.sock/info": unsupported protocol scheme "tcp"

What has changed in the version of docker? ctop isn't exactly maintained any more, but ctop really isn't the issue considering it allows customization of where to find the docker socket. I'm trying to understand why the docker docs say that the docker socket should be at this location, but its somewhere else, and seems to be different than what ctop expects?

Solution

This is probably because Docker Desktop version 4.18+ doesn't create the default Docker socket /var/run/docker.sock anymore.

The reasoning is on the official docs: https://docs.docker.com/desktop/mac/permission-requirements/

If you want to have the default socket back, you should open your Docker Desktop, go to Settings -> Advanced -> Allow the default Docker socket to be used and press Apply & restart.

Context

StackExchange DevOps Q#17905, answer score: 5

Revisions (0)

No revisions yet.