We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b535ea2 commit 386521fCopy full SHA for 386521f
core/testcontainers/core/container.py
@@ -1,4 +1,5 @@
1
import os
2
+from platform import system
3
from typing import Optional, Tuple
4
5
from docker.models.containers import Container
@@ -92,6 +93,9 @@ def get_container_host_ip(self) -> str:
92
93
host = self.get_docker_client().host()
94
if not host:
95
return "localhost"
96
+ # see https://github.com/testcontainers/testcontainers-python/issues/415
97
+ if host == "localnpipe" and "Windows" == system():
98
+ return "localhost"
99
100
# check testcontainers itself runs inside docker container
101
if inside_container() and not os.getenv("DOCKER_HOST"):
0 commit comments