diff --git a/src/docker-config.ts b/src/docker-config.ts index a68c162..eb6eafe 100644 --- a/src/docker-config.ts +++ b/src/docker-config.ts @@ -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 { @@ -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"),