Skip to content

Implement proper detection with Podman support and enhance error handling#729

Open
DeiAsPie wants to merge 7 commits into
jesseduffield:masterfrom
DeiAsPie:feature/add-proper-detection-with-podman-support
Open

Implement proper detection with Podman support and enhance error handling#729
DeiAsPie wants to merge 7 commits into
jesseduffield:masterfrom
DeiAsPie:feature/add-proper-detection-with-podman-support

Conversation

@DeiAsPie
Copy link
Copy Markdown

No description provided.

…ling

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Documents automatic socket detection for Podman, Colima, OrbStack, Lima, and Rancher Desktop. Includes setup instructions for Podman users.

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 27, 2025 07:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive Docker/Podman socket detection system with platform-specific logic and enhanced error handling. The implementation replaces the simple determineDockerHost function with a more robust detection mechanism that validates socket connectivity and supports multiple container runtimes.

Key Changes:

  • Added platform-specific socket detection with support for Docker, Podman, and various Docker Desktop alternatives (Colima, OrbStack, Lima, Rancher Desktop)
  • Implemented socket validation with timeout and connection testing to ensure detected sockets are actually working
  • Added caching mechanism to avoid repeated detection attempts

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
pkg/commands/socket_detection_common.go Implements core detection logic with priority handling (DOCKER_HOST → Docker Context → platform candidates), socket validation, and caching
pkg/commands/socket_detection_unix.go Unix-specific implementation with extensive socket candidate list covering rootless/rootful Docker/Podman and various Docker Desktop alternatives
pkg/commands/socket_detection_windows.go Windows-specific implementation supporting Docker Desktop and Podman via named pipes
pkg/commands/socket_detection_test.go Test coverage for socket candidate generation, environment variable priority, caching behavior, and Docker context handling
pkg/commands/docker.go Integrates new detection system, replaces old determineDockerHost with DetectDockerHost, adds runtime type logging
pkg/commands/docker_host_windows.go Removed old platform-specific constants (replaced by new detection system)
pkg/commands/docker_host_unix.go Removed old platform-specific constants (replaced by new detection system)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_windows.go Outdated
Comment thread pkg/commands/socket_detection_windows.go
Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_windows.go Outdated
Comment thread pkg/commands/socket_detection_test.go Outdated
Comment thread pkg/commands/socket_detection_test.go Outdated
Comment thread pkg/commands/socket_detection_unix.go
Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_windows.go Outdated
…ling across platforms

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/commands/socket_detection_windows.go Outdated
Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_test.go
Comment thread pkg/commands/socket_detection_windows_test.go
Comment thread pkg/commands/socket_detection_unix.go Outdated
Comment thread pkg/commands/socket_detection_test.go Outdated
Comment thread pkg/commands/socket_detection_common.go Outdated
…ing across platforms

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_unix.go
Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_unix.go Outdated
Copy link
Copy Markdown
Author

@DeiAsPie DeiAsPie left a comment

Choose a reason for hiding this comment

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

.

…alidation and error handling

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_unix.go Outdated
Comment thread pkg/commands/socket_detection_windows.go Outdated
Comment thread pkg/commands/socket_detection_common.go
…ging

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_unix.go
Comment thread pkg/commands/socket_detection_windows_test.go
Comment thread pkg/commands/socket_detection_windows.go
Comment thread pkg/commands/socket_detection_common.go
Comment thread pkg/commands/socket_detection_common.go Outdated
Comment thread pkg/commands/socket_detection_windows_test.go Outdated
…ction; enhance error messaging for better user guidance

Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
Copy link
Copy Markdown
Author

@DeiAsPie DeiAsPie left a comment

Choose a reason for hiding this comment

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

.

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.

2 participants