Closed georgebax closed 1 year ago
I can somewhat reproduce this with a different environment, but I suspect a similar root cause. In my case it's the docker
command that doesn't execute, and using debug logging it's because the working directory for the command (truncated in the report above to (in directory "/Users/......")
) did not exist.
It's reproducible on JDK 17.0.5 and 19.0.1, but works fine on JDK 11.0.17.
Hi, the root cause is Cannot run program "docker-compose" (in directory "/Users/......"): error=2, No such file or directory
.
So it is not able to find the docker-compose
program. This execution is delegated to the OS, and I guess it should also look in PATH
. So are you sure docker-compose
is available in your path?
Relevant plugin code: https://github.com/avast/gradle-docker-compose-plugin/blob/main/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy#L80-L84
Hi @augi, yes, docker-compose
is in my path (/usr/local/bin/), and it looks like it works now also with java 17. The only difference is that I have the export
statement in my .rc file and haven't manually executed the export
command from the shell. I don't know how this would affect it, but I guess it's fine for now.
Running into this after switching to Java 21. Something is wonky with path resolution. I have docker for mac and homebrew.
I added this workaround, which seems to work. I would suggest integrating that into the code. My docker executable lives in /usr/local/bin.
listOf("/usr/bin/docker","/usr/local/bin/docker").firstOrNull {
File(it).exists()
}?.let { docker ->
// works around an issue where the docker
// command is not found
// falls back to the default, which may work on
// some platforms
dockerExecutable.set(docker)
}
Hi, we have been using the docker-compose-plugin for a long time in our project. Recently, after migrating to java 17, I've noticed a strange behaviour.
Now, I can still run
./gradlew :startUpDevelopment
to deploy our wildfly, but only if I run it with JAVA_HOME set to Java 11. It only takes exporting the Java Home to java 17 to break the build, and the output is the following. Is java 17 not supported somehow ?This is what part of the
build.gradle
looks like: