Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
Open
Changes from all 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
7 changes: 6 additions & 1 deletion src/docker-config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as fs from "fs";
import * as path from "path";
import * as os from "os";

interface DockerConfig {
socketPath?: string;
}

/**
* Detects whether Docker or Podman is available and returns appropriate configuration
* Detects whether Docker, Colima, or Podman is available and returns appropriate configuration
* @param customSocketPath - Optional custom socket path from configuration
*/
export function getDockerConfig(customSocketPath?: string): DockerConfig {
Expand All @@ -25,6 +26,10 @@ export function getDockerConfig(customSocketPath?: string): DockerConfig {
// Docker socket paths
"/var/run/docker.sock",

// Colima socket paths
path.join(os.homedir(), ".colima", "default", "docker.sock"),
path.join(os.homedir(), ".docker", "run", "docker.sock"),

// Podman rootless socket paths
process.env.XDG_RUNTIME_DIR &&
path.join(process.env.XDG_RUNTIME_DIR, "podman", "podman.sock"),
Expand Down