Skip to content

Commit 0ae704a

Browse files
AmirHosein-Gharaatiamirhosein
and
amirhosein
authored
fix(compose): use provided docker command instead of default (#785)
closes #745 if the docker compose command is provided, use that instead of default one. Co-authored-by: amirhosein <[email protected]>
1 parent cc02f94 commit 0ae704a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/testcontainers/compose/compose.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ class DockerCompose:
139139
The list of services to use from this DockerCompose.
140140
client_args:
141141
arguments to pass to docker.from_env()
142+
docker_command_path:
143+
The docker compose command to run.
142144
143145
Example:
144146
@@ -195,7 +197,7 @@ def docker_compose_command(self) -> list[str]:
195197

196198
@cached_property
197199
def compose_command_property(self) -> list[str]:
198-
docker_compose_cmd = [self.docker_command_path or "docker", "compose"]
200+
docker_compose_cmd = [self.docker_command_path] if self.docker_command_path else ["docker", "compose"]
199201
if self.compose_file_name:
200202
for file in self.compose_file_name:
201203
docker_compose_cmd += ["-f", file]

0 commit comments

Comments
 (0)