From 96f8acc40d5782b025cf415a1428ad6ce160550e Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 27 Feb 2026 15:49:00 -0800 Subject: [PATCH] Fix Docker socket mount failing on Windows The Windows named pipe (//./pipe/docker_engine) cannot be bind-mounted into a Linux container. Use /var/run/docker.sock as the mount source on Windows, which Docker Desktop exposes for container mounts. Co-Authored-By: Claude Opus 4.6 --- app/src-tauri/src/docker/container.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src-tauri/src/docker/container.rs b/app/src-tauri/src/docker/container.rs index 9eab408..e3417ea 100644 --- a/app/src-tauri/src/docker/container.rs +++ b/app/src-tauri/src/docker/container.rs @@ -212,9 +212,17 @@ pub async fn create_container( // Docker socket (only if allowed) if project.allow_docker_access { + // On Windows, the named pipe (//./pipe/docker_engine) cannot be + // bind-mounted into a Linux container. Docker Desktop exposes the + // daemon socket as /var/run/docker.sock for container mounts. + let mount_source = if docker_socket_path == "//./pipe/docker_engine" { + "/var/run/docker.sock".to_string() + } else { + docker_socket_path.to_string() + }; mounts.push(Mount { target: Some("/var/run/docker.sock".to_string()), - source: Some(docker_socket_path.to_string()), + source: Some(mount_source), typ: Some(MountTypeEnum::BIND), read_only: Some(false), ..Default::default()