Skip to content

Commit

Permalink
beep boop make the admin network the default network for new containers
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhb authored Jan 2, 2022
1 parent 7bc216d commit e71f479
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ async fn start_container(
} else {
None
},
// Connect to HaaS admin network
network_mode: Some(String::from("haas_admin")),
..Default::default()
}),
..Default::default()
Expand All @@ -83,20 +85,6 @@ async fn start_container(
.await
.map_err(|e| e.to_string())?;

// Connect to HaaS admin network
docker
.connect_network(
"haas_admin",
ConnectNetworkOptions {
container: &container.id,
endpoint_config: EndpointSettings {
..Default::default()
},
},
)
.await
.map_err(|e| e.to_string())?;

// Start the container
docker
.start_container::<String>(&container.id, None)
Expand Down

0 comments on commit e71f479

Please sign in to comment.