Skip to content

Commit

Permalink
consider all possible DOCKER_HOST value types, including tcp/http/https
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Ormanji committed Jan 15, 2025
1 parent 883c02e commit 2f7a0e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cargo-shuttle/src/provisioner_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl LocalProvisioner {
// This only constructs the client and does not try to connect.
// If the socket is not found, a "no such file" error will happen on the first request to Docker.
Ok(Self {
docker: Docker::connect_with_local_defaults()?,
docker: Docker::connect_with_defaults()?,
})
}

Expand Down
2 changes: 1 addition & 1 deletion gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ pub mod tests {

impl World {
pub async fn new() -> Self {
let docker = Docker::connect_with_local_defaults().unwrap();
let docker = Docker::connect_with_defaults().unwrap();

docker
.list_images::<&str>(None)
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ impl GatewayService {
));
}

let docker = Docker::connect_with_socket(&args.docker_host, 60, API_DEFAULT_VERSION).unwrap();
let docker =
Docker::connect_with_socket(&args.docker_host, 60, API_DEFAULT_VERSION).unwrap();

let container_settings = ContainerSettings::builder().from_args(&args).await;

Expand Down

0 comments on commit 2f7a0e1

Please sign in to comment.