ktorio / ktor-build-plugins

Ktor Plugins for Build Systems
Apache License 2.0
58 stars 11 forks source link

KTOR-4483 Building a docker image on top of java 11 layer using java 17 fails with strange jib exception #19

Closed jvmusin closed 2 years ago

jvmusin commented 2 years ago

@andreyaksenov Please try to set ktor.docker.jreVersion to JRE_11 and see if you have an understandable error message. I remember you had this problem previously.

andreyaksenov commented 2 years ago

@jvmusin running the ./gradlew :samples:ktor-docker-sample:buildImage command on the latest main still shows a jib-specific error:

* What went wrong:
Execution failed for task ':samples:ktor-docker-sample:jibBuildTar'.
> Your project is using Java 17 but the base image is for Java 11, perhaps you should configure a Java 17-compatible base image using the 'jib.from.image' parameter, or set targetCompatibility = 11 or below in your build configuration
jvmusin commented 2 years ago

@andreyaksenov The fix is not in the main branch yet. Try to git checkout KTOR-4483-strange-jib-exception first.

andreyaksenov commented 2 years ago

@andreyaksenov The fix is not in the main branch yet. Try to git checkout KTOR-4483-strange-jib-exception first.

ooh, sorry) Yep, now it works fine.