Skip to content

Commit

Permalink
Default to connecting to docker using bollard::connect_with_socket_de…
Browse files Browse the repository at this point in the history
…faults
  • Loading branch information
elizabethengelman committed Feb 28, 2024
1 parent 8ec1c0a commit 7a77e57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/soroban-cli/src/commands/network/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ pub async fn connect_to_docker(
Docker::connect_with_named_pipe(&h, DEFAULT_TIMEOUT, API_DEFAULT_VERSION)
}
_ => {
// default to connecting with unix with whatever the DOCKER_HOST is
Docker::connect_with_unix(&host, DEFAULT_TIMEOUT, API_DEFAULT_VERSION)
// default to connecting with socket defaults
Docker::connect_with_socket_defaults()
}
}?;

Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/network/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn get_image_name(cmd: &Cmd) -> String {
format!("{DOCKER_IMAGE}:{image_tag}")
}

/// The port mapping in the bollard crate is formatted differently than the docker CLI. In the docker CLI, we usually specify exposed ports as `-p HOST_PORT:CONTAINER_PORT`. But with the bollard crate, it is expecting the port mapping to be a map of the container port (with the protocol) to the host port.
// The port mapping in the bollard crate is formatted differently than the docker CLI. In the docker CLI, we usually specify exposed ports as `-p HOST_PORT:CONTAINER_PORT`. But with the bollard crate, it is expecting the port mapping to be a map of the container port (with the protocol) to the host port.
fn get_port_mapping(cmd: &Cmd) -> HashMap<String, Option<Vec<PortBinding>>> {
let mut port_mapping_hash = HashMap::new();
for port_mapping in &cmd.ports_mapping {
Expand Down

0 comments on commit 7a77e57

Please sign in to comment.