Skip to content

Commit

Permalink
fix: Use the same socket for connecting and mounting
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv committed Jan 11, 2025
1 parent efe36e2 commit 895db03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/running_docker_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bollard::{
exec::{CreateExecOptions, StartExecResults},
image::BuildImageOptions,
secret::{ContainerState, ContainerStateStatusEnum},
Docker,
Docker, API_DEFAULT_VERSION,
};

use crate::{ContextBuilder, DockerExecutorError};
Expand Down Expand Up @@ -54,7 +54,8 @@ impl RunningDockerExecutor {
dockerfile: &Path,
image_name: &str,
) -> Result<RunningDockerExecutor, DockerExecutorError> {
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 {}",
Expand Down Expand Up @@ -89,7 +90,6 @@ impl RunningDockerExecutor {
}
}

let socket_path = get_socket_path();
let config = Config {
image: Some(image_name.as_str()),
tty: Some(true),
Expand Down

0 comments on commit 895db03

Please sign in to comment.