-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Simplify setup required for remote DOCKER_HOST over SSH #3045
Comments
/cc @AkihiroSuda @tonistiigi any ideas for an elegant solution? |
I choose to create a symblink to /bin and it's fine |
I just ran into this myself setting up a new machine and it stumped me! SIP (system integrity protection) on macOS now makes it painful to create symlinks in The good news is the workaround suggested by @leighmcculloch works for me. |
@hairyhenderson 👋 (it's been a while, hope you're doing well!) I just realised we did merge a patch that (IIUC) may solve this; It's part of docker 24.0 and up, but let me know if I'm correct! |
OH, actually, reading it wrong; this is not about the socket path 🙈 (blame multi-tasking) |
hi @thaJeztah 👋😁 Thanks for the link to the other PR - it's related, but different 😉... |
Description
When connecting to a remote host over ssh, by configuring the
DOCKER_HOST
environment variable, or by using thedocker context
functionality and specifying thehost=
parameter, some Linux/Unix environments require additional setup because the docker CLI assumes that the host it is SSHing into has docker located in thePATH
.Unfortunately while
docker
is almost always installed into the userPATH
, it is not always installed into the system path. This causes the docker CLI to fail when attempting to use these systems as a remote host without additional setup.One system that this occurs on is macOS. The default installation directory of
docker
on Mac's is/usr/local/bin
but that path is not in the systemPATH
that sshd configures for the ssh session.As an example, this is what the default
PATH
is on macOS:To work around this issue a user must run the following commands on macOS and other systems that have the same setup.
Steps to reproduce the issue:
DOCKER_HOST=ssh://<host> docker ps
Describe the results you received:
Describe the results you expected:
I expected it to be relatively straight forward to provide an SSH host address for another machine running docker and that docker could find itself.
I think it would significantly simplify using docker remotely across machines if docker didn't only rely on
PATH
but searched some common paths that Docker typically installs itself, such as/usr/local/bin/
.Additional information you deem important (e.g. issue happens only occasionally):
Issue happens consistently.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
This is all running on physical machines. I had the same problem with one flavor of Linux a little while ago on AWS, but I didn't note the details of which distro and version and don't remember.
The text was updated successfully, but these errors were encountered: