Skip to content

fix(bootstrap): auto-detect Docker Desktop socket on macOS#509

Open
Kh4L wants to merge 1 commit intoNVIDIA:mainfrom
Kh4L:fix/docker-desktop-socket-path
Open

fix(bootstrap): auto-detect Docker Desktop socket on macOS#509
Kh4L wants to merge 1 commit intoNVIDIA:mainfrom
Kh4L:fix/docker-desktop-socket-path

Conversation

@Kh4L
Copy link
Contributor

@Kh4L Kh4L commented Mar 20, 2026

Summary

  • Adds ~/Library/Containers/com.docker.docker/Data/docker-cli.sock to the alternative socket probe list in check_docker_available()
  • When the default socket (/var/run/docker.sock) is unreachable, automatically tries alternative sockets before failing
  • Prints which alternative socket was used so the user knows what happened

Related Issue

Closes #443

Changes

  • crates/openshell-bootstrap/src/docker.rs:
    • Added Docker Desktop macOS socket to find_alternative_sockets() home-relative probes
    • Added try_alternative_sockets() helper that iterates alternatives and connects through the first responsive one
    • check_docker_available() now calls try_alternative_sockets() on both connection failure and ping failure before returning an error

Testing

  • mise run test passes
  • On macOS with Docker Desktop (no /var/run/docker.sock): openshell gateway start connects via the alternative socket
  • On macOS with Colima/OrbStack: existing behavior unchanged
  • On Linux: no behavior change (Docker Desktop socket path doesn't exist)

Checklist

  • Follows Conventional Commits format
  • Signed-off-by line included
  • No new dependencies introduced

Add ~/Library/Containers/com.docker.docker/Data/docker-cli.sock to
the alternative socket probe list. Recent Docker Desktop versions on
macOS may not create /var/run/docker.sock, causing gateway start to
fail with a misleading connection error.

When the default socket is unreachable, check_docker_available() now
iterates alternative sockets and connects through the first one that
responds to a ping, instead of failing immediately.

Closes NVIDIA#443

Signed-off-by: Serge Panev <spanev@nvidia.com>
@Kh4L Kh4L requested a review from a team as a code owner March 20, 2026 20:18
@johntmyers
Copy link
Collaborator

Is this the same as #494? We're already reviewing that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: openshell gateway start fails on macOS Docker Desktop — wrong socket path

2 participants