Ensures the specified external network exists for proxy internet access.
(&self, network_name: &str)
| 535 | |
| 536 | /// Ensures the specified external network exists for proxy internet access. |
| 537 | async fn ensure_network(&self, network_name: &str) -> Result<()> { |
| 538 | if !self |
| 539 | .docker_client |
| 540 | .network_exists(network_name) |
| 541 | .await |
| 542 | .map_err(|e| anyhow::anyhow!("Failed to check if network exists: {e}"))? |
| 543 | { |
| 544 | self.docker_client |
| 545 | .create_network(network_name) |
| 546 | .await |
| 547 | .map_err(|e| anyhow::anyhow!("Failed to create network: {e}"))?; |
| 548 | } |
| 549 | Ok(()) |
| 550 | } |
| 551 | |
| 552 | /// Ensures the proxy container for the given config is running. |
| 553 | /// |
no test coverage detected