diff --git a/testcontainers/core/container.py b/testcontainers/core/container.py index c195a85a9..3ee98e399 100644 --- a/testcontainers/core/container.py +++ b/testcontainers/core/container.py @@ -93,6 +93,7 @@ def get_container_host_ip(self) -> str: if gateway_ip == host: return self.get_docker_client().bridge_ip(self._container.id) + return gateway_ip return host def get_exposed_port(self, port) -> str: