Implement proper detection with Podman support and enhance error handling#729
Conversation
…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>
There was a problem hiding this comment.
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.
…ling across platforms Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
There was a problem hiding this comment.
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.
…ing across platforms Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
There was a problem hiding this comment.
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.
…alidation and error handling Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
There was a problem hiding this comment.
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.
…ging Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
There was a problem hiding this comment.
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.
…ction; enhance error messaging for better user guidance Signed-off-by: DeiAsPie <93835541+DeiAsPie@users.noreply.github.com>
No description provided.