From ab426832d173889603d4f0099011e4886ae44df2 Mon Sep 17 00:00:00 2001 From: Tuvshinbayar Date: Fri, 29 May 2020 09:20:44 +0800 Subject: [PATCH] fallback to gateway address --- testcontainers/core/container.py | 1 + 1 file changed, 1 insertion(+) 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: