Repository navigation
fix: use correct docker.sock binding with vector (fixes #3127, #3512, #3593) - #4791
Conversation
bc2752d to
7368ff6
Compare
Pull Request Test Coverage Report for Build 23751202800Details
💛 - Coveralls |
7368ff6 to
3f2ce38
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughExpanded unix Docker socket handling to treat both Sequence Diagram(s)(omitted) Assessment against linked issues
Out-of-scope changes
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3f2ce38 to
4ed5e3e
Compare
4ed5e3e to
546a524
Compare
170baf3 to
b829e30
Compare
@avallete pinging again, would really like someone to take a look at this or tell me why it's being passed over. |
…upabase#3127, supabase#3512, supabase#3593) This fixes Docker Desktop on Linux failing to start the vector container. The container tries to bind to the Docker Desktop socket directly, which is unsupported. The host binding path should always be /var/run/docker.sock, which has special handling under the hood (see docker/for-mac#6545 (comment)).
b829e30 to
7071ee1
Compare
avallete
left a comment
There was a problem hiding this comment.
Thank's for your contribution ! Indeed we missed that case for docker desktop.
…acOS (fixes supabase#5073) ## What kind of change does this PR introduce? Bug fix (docker socket bind mount for colima, macOS-only). ## What is the current behavior? When `config.toml` defines `[analytics] enabled = true`, `supabase start` starts the vector container with a bind-mount derived from `utils.Docker.DaemonHost()` (`apps/cli-go/internal/start/start.go`, `case "unix"`). Docker Desktop socket paths (`~/.docker/run/docker.sock`, `~/.docker/desktop/docker.sock`) already take a special branch: instead of mounting the macOS-side socket directly, the CLI bind-mounts `/var/run/docker.sock` (`client.DefaultDockerHost`) and lets Docker handle it under the hood (same pattern as supabase#4791 / `7071ee1`). Colima does not match that branch. With `DOCKER_HOST` pointing at `~/.colima/default/docker.sock` (or `~/.colima/docker.sock`), the CLI falls through to the `else` path and bind-mounts the Colima client socket path verbatim into vector. On macOS + Colima this breaks `supabase start` with analytics enabled: - **default `virtiofs` mount type:** container creation fails — `mkdir ~/.colima/default/docker.sock: operation not supported` - **`sshfs` mount type:** vector starts but cannot reach dockerd — `Listing currently running containers failed: Connection refused` Reported in supabase#5073. Proposed fix in stale-closed supabase#5074 by @hk220; not merged. ## What is the new behavior? Extend the existing Docker Desktop socket workaround to Colima: ```go strings.HasSuffix(parsed.Host, "/.colima/default/docker.sock") || strings.HasSuffix(parsed.Host, "/.colima/docker.sock") ``` When matched, vector bind-mounts `/var/run/docker.sock` inside the VM (same `dindHost.Host` self-bind as Docker Desktop), not the macOS-side Colima forwarding socket. Validated locally on macOS 26.5.1, Colima 0.10.3, `[analytics] enabled = true`, fresh `colima stop && colima delete` between runs — works with both default **`virtiofs`** and **`--mount-type sshfs`**. Vector stays healthy; Studio Logs Explorer ingests container logs. Fixes supabase#5073 Based on supabase#5074 by @hk220 --------- Co-authored-by: kazuki <[email protected]>
This fixes Docker Desktop on Linux failing to start the vector container. The container tries to bind to the Docker Desktop socket directly, which is unsupported. This fix resolves #3127, #3512, and #3593.
What kind of change does this PR introduce?
Bug fix.
What is the current behavior?
When using Docker Desktop on Linux, Vector fails to start when doing
supabase start.What is the new behavior?
When using Docker Desktop on Linux, Vector successfully starts when doing
supabase start.Additional context
Using Docker or Docker Desktop on Linux, the specified host binding path to the Docker socket should be
/var/run/docker.sock, as that path has special handling under the hood (see docker/for-mac#6545 (comment)). Note that it does not directly use the socket sitting at/var/run/docker.sockon the host machine. My understanding is that what it ends up doing under the hood is essentially using what you get with/var/run/docker.sock.rawfrom outside Docker, as mentioned here: https://docs.docker.com/extensions/extensions-sdk/guides/use-docker-socket-from-backend/