-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle when socket is in the home directory #345
Comments
This is how I'm handling this for now myself btw: aptos-labs/aptos-core#10654. |
I was looking to see if the official moby source does this, as I guess that's slightly different to Docker Desktop ? (which OS are you referring to?) I didn't find anything in the moby source that there's a fallback, but I did see this line: which suggests that one should set the |
In my case I'm mostly referring to MacOS, but I suppose it might be relevant to Linux too. Just not Windows, since it's always just that same named pipe. As for the DOCKER_HOST environment variable, it seems like Docker when installed doesn't configure this. The user could set this themselves but that's no better than just using the env var to tell Bollard where to find the Docker socket. What I'm sort of hoping for / planning here is to have Bollard try /var/run/docker.sock first and then if that's not there, try the one in the home dir. In other words ideally the default connect function on Bollard should just work out of the box with either socket location. |
Thanks, I noticed when looking more closely at this that there's a docker command In principal it sounds fine to have that fallback added, if you're interested in that. |
Neato sounds good! I'll put this on my to do list. |
Retired and clearly had to give the work laptop back. So now working on an old NUC running Arch. and there were a few things that didn't quite work for me when starting, and that just created a whole bunch of experimentation. I've unwound everything but the essential improvements. * Updated Bollard; this was the crux of my problem and resulted in quite a bit of code change, until I found this: fussybeaver/bollard#345 * A typo or two. * A clippy warning about unused import.
Hey hey,
Currently when creating a Docker client like this:
It looks for the socket at
/var/run/docker.sock
. The new default in Docker Desktop is to put the socket in your home dir instead, so new Docker users won't have the socket there, but at~/.docker/run/docker.sock
.Would you accept a PR that makes the function look first for the socket at
/var/run/docker.sock
and then at~/.docker/run/docker.sock
?Thanks!
The text was updated successfully, but these errors were encountered: