Connects the specified proxy container to an agent's isolated network. This must be called BEFORE starting the agent container so the agent can reach the proxy.
(
&self,
proxy_container_name: &str,
network_name: &str,
)
| 751 | /// This must be called BEFORE starting the agent container so the agent |
| 752 | /// can reach the proxy. |
| 753 | pub(crate) async fn connect_proxy_to_network( |
| 754 | &self, |
| 755 | proxy_container_name: &str, |
| 756 | network_name: &str, |
| 757 | ) -> Result<()> { |
| 758 | self.docker_client |
| 759 | .connect_container_to_network(proxy_container_name, network_name) |
| 760 | .await |
| 761 | .map_err(|e| anyhow::anyhow!("Failed to connect proxy to network: {e}")) |
| 762 | } |
| 763 | |
| 764 | /// Cleans up an agent's network after task completion. |
| 765 | /// |