Skip to content

Commit bc2752d

Browse files
committed
fix: use correct docker.sock binding when starting vector img (fixes #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)).
1 parent e07c7ea commit bc2752d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/start/start.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,10 @@ EOF
377377
case "unix":
378378
if dindHost, err = client.ParseHostURL(client.DefaultDockerHost); err != nil {
379379
return errors.Errorf("failed to parse default host: %w", err)
380-
} else if strings.HasSuffix(parsed.Host, "/.docker/run/docker.sock") {
381-
fmt.Fprintln(os.Stderr, utils.Yellow("WARNING:"), "analytics requires mounting default docker socket:", dindHost.Host)
380+
} else if strings.HasSuffix(parsed.Host, "/.docker/run/docker.sock") ||
381+
strings.HasSuffix(parsed.Host, "/.docker/desktop/docker.sock") {
382+
// Docker will not mount rootless socket directly;
383+
// instead, specify root socket to have it handled under the hood
382384
binds = append(binds, fmt.Sprintf("%[1]s:%[1]s:ro", dindHost.Host))
383385
} else {
384386
// Podman and OrbStack can mount root-less socket without issue

0 commit comments

Comments
 (0)