public ContainerisedDockerCompose(List<File> composeFiles, String identifier) {
super(TestcontainersConfiguration.getInstance().getDockerComposeContainerImage());
validateFileList(composeFiles);
addEnv(ENV_PROJECT_NAME, identifier);
final File dockerComposeBaseFile = composeFiles.get(0);
final String pwd = dockerComposeBaseFile.getAbsoluteFile().getParentFile().getAbsolutePath();
final String containerPwd = MountableFile.forHostPath(pwd).getFilesystemPath();
final List<String> absoluteDockerComposeFiles = composeFiles.stream()
.map(File::getAbsolutePath)
.map(MountableFile::forHostPath)
.map(MountableFile::getFilesystemPath)
.collect(toList());
final String composeFileEnvVariableValue = Joiner.on(UNIX_PATH_SEPERATOR).join(absoluteDockerComposeFiles);
logger().debug("Set env COMPOSE_FILE={}", composeFileEnvVariableValue);
addEnv(ENV_COMPOSE_FILE, composeFileEnvVariableValue);
addFileSystemBind(pwd, containerPwd, READ_ONLY);
addFileSystemBind(getDockerSocketHostPath(), "/docker.sock", READ_WRITE);
addEnv("DOCKER_HOST", "unix:///docker.sock");
setStartupCheckStrategy(new IndefiniteWaitOneShotStartupCheckStrategy());
setWorkingDirectory(containerPwd);
String dockerConfigPath = determineDockerConfigPath();
if (dockerConfigPath != null && !dockerConfigPath.isEmpty()) {
addFileSystemBind(dockerConfigPath, DOCKER_CONFIG_FILE, READ_ONLY);
}
}