-
Notifications
You must be signed in to change notification settings - Fork 323
Description
Agent Diagnostic
Investigated via explore agent. Loaded codebase search across crates/openshell-bootstrap/src/docker.rs and related files.
Findings:
check_docker_available()atcrates/openshell-bootstrap/src/docker.rs:122usesDocker::connect_with_local_defaults()which respectsDOCKER_HOSTthen falls back to/var/run/docker.sock.docker_not_reachable_error()at line 153 checksPath::new("/var/run/docker.sock").exists()andDOCKER_HOST.find_alternative_sockets()at line 208 probes Colima (~/.colima/docker.sock) and OrbStack (~/.orbstack/run/docker.sock) but does not probe the Docker Desktop macOS-specific socket path:~/Library/Containers/com.docker.docker/Data/docker-cli.sock.- The
WELL_KNOWN_SOCKET_PATHSconstant at line 110 only contains/var/run/docker.sock. - The error path (line 192-198) when the socket exists but daemon is unresponsive does not suggest the Docker Desktop alternative path.
Root cause: Docker Desktop on recent macOS versions does not always create /var/run/docker.sock. The actual socket lives at ~/Library/Containers/com.docker.docker/Data/docker-cli.sock. OpenShell does not probe this path, nor does it auto-detect it as a fallback.
Upstream reference: NemoClaw#309
Description
Actual behavior: openshell gateway start fails with:
Error in the hyper legacy client: client error (Connect)
Docker socket found at /var/run/docker.sock but the daemon is not responding.
Expected behavior: OpenShell should detect the Docker Desktop macOS socket at ~/Library/Containers/com.docker.docker/Data/docker-cli.sock (or respect DOCKER_HOST) and connect successfully without manual workaround.
Reproduction Steps
- Install Docker Desktop on macOS (Apple Silicon)
- Ensure
/var/run/docker.sockis not present or not functional (common on recent Docker Desktop versions) - Run
openshell gateway start - Observe connection failure
Environment
- OS: macOS (Apple Silicon, M4 Max)
- Docker: Docker Desktop 29.2.1
- OpenShell: 0.0.10
Logs
Error in the hyper legacy client: client error (Connect)
Docker socket found at /var/run/docker.sock but the daemon is not responding.
Proposed Fix
The fix is localized to crates/openshell-bootstrap/src/docker.rs:
- Add
~/Library/Containers/com.docker.docker/Data/docker-cli.sockto thefind_alternative_sockets()home-relative probes (alongside Colima and OrbStack) - In
check_docker_available(), whenDocker::connect_with_local_defaults()succeeds butping()fails (or when the initial connect fails), probe alternative sockets and attempt connection viaDocker::connect_with_socket()before returning an error - Update error messages to suggest the Docker Desktop socket path when detected on macOS
- Add unit tests for the new socket path detection