Skip to content

Commit 2ea0969

Browse files
authored
Favor copy compose file instead of mount (#6945)
It will enable to make docker compose with remote runtimes.
1 parent 6442d27 commit 2ea0969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ public ContainerisedDockerCompose(List<File> composeFiles, String identifier) {
689689
final String composeFileEnvVariableValue = Joiner.on(UNIX_PATH_SEPERATOR).join(absoluteDockerComposeFiles); // we always need the UNIX path separator
690690
logger().debug("Set env COMPOSE_FILE={}", composeFileEnvVariableValue);
691691
addEnv(ENV_COMPOSE_FILE, composeFileEnvVariableValue);
692-
addFileSystemBind(pwd, containerPwd, BindMode.READ_WRITE);
692+
withCopyFileToContainer(MountableFile.forHostPath(pwd), containerPwd);
693693

694694
// Ensure that compose can access docker. Since the container is assumed to be running on the same machine
695695
// as the docker daemon, just mapping the docker control socket is OK.

0 commit comments

Comments
 (0)