Skip to content

Commit 4872ea5

Browse files
authoredApr 2, 2024··
fix(core): env vars not being respected due to constructor call (#524)
fix #521
1 parent b5c7a1b commit 4872ea5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎core/testcontainers/core/docker_client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def __init__(self, **kwargs) -> None:
4141

4242
if docker_host:
4343
LOGGER.info(f"using host {docker_host}")
44-
self.client = docker.DockerClient(base_url=docker_host)
44+
os.environ["DOCKER_HOST"] = docker_host
45+
self.client = docker.from_env(**kwargs)
4546
else:
4647
self.client = docker.from_env(**kwargs)
4748
self.client.api.headers["x-tc-sid"] = SESSION_ID

0 commit comments

Comments
 (0)
Please sign in to comment.