Closed rindress closed 2 years ago
Hi, thanks for the report. I just tried here and am seeing the same issue. I've mostly been running ./gradlew bootRun
and deploying to Cloud Run so very possible I hadn't tested docker setup with latest code. This is heavily based on sample from https://github.com/GoogleCloudPlatform/kotlin-samples/blob/main/run/README.md though don't believe those use ktor client fwiw.
@jamesward just on the off chance that you've come across this before?
hmm, could be related to version of JVM used...
ok, not sure if this is cleanest or recommended way to do this but following seems to work here (added to build.gradle.kts
)
tasks.getByName<org.springframework.boot.gradle.tasks.bundling.BootBuildImage>("bootBuildImage") {
environment = mapOf("BP_JVM_VERSION" to "11.*")
}
Confirmed works here as well. Thanks!
Docker version:
4.5.0 (74594)
I am able to run
./gradlew bootRun
successfully. Then I tried to build and run the docker image and I am getting a NoClassDefFound exception for HttpClient. Here is the output: