Repository navigation
Conversation
…sock socket file inside it.
|
Sorry, I fixed the typos in this title and description. |
| strings.HasSuffix(parsed.Host, "/.docker/desktop/docker.sock") { | ||
| // Docker will not mount rootless socket directly; | ||
| strings.HasSuffix(parsed.Host, "/.docker/desktop/docker.sock") || | ||
| strings.Contains(parsed.Host, "/.colima/") { |
There was a problem hiding this comment.
you should probably fully specify /.colima/docker.sock for parity with the docker desktop comparison.
There was a problem hiding this comment.
Thank you!
Since Colima creates docker.sock in two locations, configure it as shown above.
% find ~/.colima -name ‘docker.sock’
/Users/hk/.colima/default/docker.sock
/Users/hk/.colima/docker.sock
%
|
I haven't tested this fix but am running into the same problem. The main issue is that for colima you need a bind mount for the VM's /var/run/docker.sock to /var/run/docker.sock vs trying to use the macos ~/.colima/dock.sock (See this comment in this issue abiosoft/colima#997) So the fix look sensible to me. |
|
@hk220 I'm not a contributor on this repo so can't really review. |
|
@huffstarter This is my first contribution, so I made a mistake. |
|
Hi! Thanks for contributing to Supabase CLI. We're closing this pull request because it has not had any activity for 60 days, and we try to keep the PR queue focused on changes that are still active. If this change is still relevant, please update it against the current develop branch and reopen it if GitHub allows, or leave a comment and a maintainer can help reopen it. You're also welcome to open a fresh PR with updated changes. |
|
Note, file has been renamed from |
|
@hk220 I've tested your fix on current supabase/cli v2.109.1; it works 🎉 Applied the same change to Steps for others to reproduceTo reproduce:
# apps/cli-go/internal/start/start.go
if dindHost, err = client.ParseHostURL(client.DefaultDockerHost); err != nil {
return errors.Errorf("failed to parse default host: %w", err)
} else if strings.HasSuffix(parsed.Host, "/.docker/run/docker.sock") ||
- strings.HasSuffix(parsed.Host, "/.docker/desktop/docker.sock") {
- // Docker will not mount rootless socket directly;
+ strings.HasSuffix(parsed.Host, "/.docker/desktop/docker.sock") ||
+ strings.HasSuffix(parsed.Host, "/.colima/default/docker.sock") ||
+ strings.HasSuffix(parsed.Host, "/.colima/docker.sock") {
+ // Docker Desktop and Colima will not mount rootless socket directly;
// instead, specify root socket to have it handled under the hood
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s:ro", dindHost.Host))
} else {
Result: @hk220 Would you like to update this PR against |
…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]>
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
#5073
What is the new behavior?
Force the use of client.DefaultDockerHost when running supabase start with colima