From 2ea0969f8c97f5e4d10dcbdc1553953ff56498d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez=20Gonzales?= Date: Fri, 28 Apr 2023 18:54:41 -0600 Subject: [PATCH] Favor copy compose file instead of mount (#6945) It will enable to make docker compose with remote runtimes. --- .../org/testcontainers/containers/DockerComposeContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java b/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java index fa5a6eba983..090215fcec3 100644 --- a/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java +++ b/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java @@ -689,7 +689,7 @@ public ContainerisedDockerCompose(List composeFiles, String identifier) { final String composeFileEnvVariableValue = Joiner.on(UNIX_PATH_SEPERATOR).join(absoluteDockerComposeFiles); // we always need the UNIX path separator logger().debug("Set env COMPOSE_FILE={}", composeFileEnvVariableValue); addEnv(ENV_COMPOSE_FILE, composeFileEnvVariableValue); - addFileSystemBind(pwd, containerPwd, BindMode.READ_WRITE); + withCopyFileToContainer(MountableFile.forHostPath(pwd), containerPwd); // Ensure that compose can access docker. Since the container is assumed to be running on the same machine // as the docker daemon, just mapping the docker control socket is OK.