Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,9 @@ EOF
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.Contains(parsed.Host, "/.colima/") {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably fully specify /.colima/docker.sock for parity with the docker desktop comparison.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
%

// 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 {
Expand Down