Skip to content

Commit 63fcd52

Browse files
authoredMar 29, 2024··
fix(core): allow setting docker command path for docker compose (#512)
fix #306 the original request was to remedy tc-python's dependency on docker-compose. this is something totally different but its what was asked for, so oh well. ¯\_(ツ)_/¯.
1 parent 545240d commit 63fcd52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎core/testcontainers/compose/compose.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class DockerCompose:
158158
wait: bool = True
159159
env_file: Optional[str] = None
160160
services: Optional[list[str]] = None
161+
docker_command_path: Optional[str] = None
161162

162163
def __post_init__(self):
163164
if isinstance(self.compose_file_name, str):
@@ -181,7 +182,7 @@ def docker_compose_command(self) -> list[str]:
181182

182183
@cached_property
183184
def compose_command_property(self) -> list[str]:
184-
docker_compose_cmd = ["docker", "compose"]
185+
docker_compose_cmd = [self.docker_command_path or "docker", "compose"]
185186
if self.compose_file_name:
186187
for file in self.compose_file_name:
187188
docker_compose_cmd += ["-f", file]

0 commit comments

Comments
 (0)
Please sign in to comment.