Skip to content

Commit 6b33025

Browse files
committed
feat: add alternative to TC_HOST as in Java / .NET
1 parent e04b7ac commit 6b33025

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/testcontainers/core/docker_client.py

+2
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def host(self) -> str:
166166
# https://github.com/testcontainers/testcontainers-go/blob/dd76d1e39c654433a3d80429690d07abcec04424/docker.go#L644
167167
# if os env TC_HOST is set, use it
168168
host = os.environ.get("TC_HOST")
169+
if not host:
170+
host = os.environ.get("TESTCONTAINERS_HOST_OVERRIDE")
169171
if host:
170172
return host
171173
try:

0 commit comments

Comments
 (0)