Commit 5ec3f84
committed
fix: default to unix scheme when DOCKER_HOST is a path
When DOCKER_HOST is set to a filesystem path without a scheme
(e.g. /var/run/docker.sock), parseDockerDaemonHost previously
defaulted to the "tcp" protocol, producing a confusing error:
"Cannot connect to the Docker daemon at tcp://localhost:2375/foo.sock"
Now, if the address starts with "/" or "./", the parser defaults
to "unix" instead of "tcp", which matches the user's intent and
produces a correct connection or a clear error.
Fixes #5846
Signed-off-by: Aaron Mark <64331623+amarkdotdev@users.noreply.github.com>1 parent 1d1562e commit 5ec3f84
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments