Skip to content

Commit

Permalink
fix(core): env vars not being respected due to constructor call (#524)
Browse files Browse the repository at this point in the history
fix #521
  • Loading branch information
alexanderankin committed Apr 2, 2024
1 parent b5c7a1b commit 4872ea5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/testcontainers/core/docker_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def __init__(self, **kwargs) -> None:

if docker_host:
LOGGER.info(f"using host {docker_host}")
self.client = docker.DockerClient(base_url=docker_host)
os.environ["DOCKER_HOST"] = docker_host
self.client = docker.from_env(**kwargs)
else:
self.client = docker.from_env(**kwargs)
self.client.api.headers["x-tc-sid"] = SESSION_ID
Expand Down

0 comments on commit 4872ea5

Please sign in to comment.