From 895db036d1e8bf298b35315d48b865139d2c97d6 Mon Sep 17 00:00:00 2001 From: Timon Vonk Date: Sat, 11 Jan 2025 16:21:00 +0100 Subject: [PATCH] fix: Use the same socket for connecting and mounting --- src/running_docker_executor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/running_docker_executor.rs b/src/running_docker_executor.rs index fd833d7..476a795 100644 --- a/src/running_docker_executor.rs +++ b/src/running_docker_executor.rs @@ -16,7 +16,7 @@ use bollard::{ exec::{CreateExecOptions, StartExecResults}, image::BuildImageOptions, secret::{ContainerState, ContainerStateStatusEnum}, - Docker, + Docker, API_DEFAULT_VERSION, }; use crate::{ContextBuilder, DockerExecutorError}; @@ -54,7 +54,8 @@ impl RunningDockerExecutor { dockerfile: &Path, image_name: &str, ) -> Result { - let docker = Docker::connect_with_socket_defaults()?; + let socket_path = get_socket_path(); + let docker = Docker::connect_with_socket(&socket_path, 120, API_DEFAULT_VERSION)?; tracing::warn!( "Creating archive for context from {}", @@ -89,7 +90,6 @@ impl RunningDockerExecutor { } } - let socket_path = get_socket_path(); let config = Config { image: Some(image_name.as_str()), tty: Some(true),