You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ClassRule
public static DockerComposeContainer dockerCompose = new DockerComposeContainer(ID, COMPOSE_FILE)
.withLocalCompose(true)
.withPull(false)
.withTailChildContainers(true)
.withExposedService("elastic", 9200)
.withExposedService("logstash", 9600)
.withExposedService("stats", 8282);
`
THEN: org.testcontainers.containers.ContainerLaunchException: Local Docker Compose not found. Is docker-compose on the PATH? at org.testcontainers.containers.LocalDockerCompose.invoke(DockerComposeContainer.java:497) at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:151) at org.testcontainers.containers.DockerComposeContainer.createServices(DockerComposeContainer.java:127) at org.testcontainers.containers.DockerComposeContainer.starting(DockerComposeContainer.java:111)
This heppend because of (DockerComposeContainer, line 498): CommandLine.executableExists(COMPOSE_EXECUTABLE)
public static boolean executableExists(String executable) {
// First check if we've been given the full path already
File directFile = new File(executable);
if (directFile.exists() && directFile.canExecute()) {
return true;
}
for (String pathString : getSystemPath()) {
Path path = Paths.get(pathString);
if (Files.exists(path.resolve(executable)) && Files.isExecutable(path.resolve(executable))) {
return true;
}
}
return false;
}
File like docker-compose can't be resolved in PATH, because of there is docker-compose.exe binary on Win10, not simple docker-compose.
Activity
Fix docker-compose executable check for Win10 (testcontainers#460)
bsnisar commentedon Sep 21, 2017
I have create a pull request for this issue please review, guys.
Fix docker-compose executable check: renaming regarding review commen…
bsnisar commentedon Sep 22, 2017
Fix docker-compose executable check: refactoring based on review comm…
Update CHANGELOG.md about testcontainers#460 issue
Next update CHANGELOG.md about testcontainers#460 issue