0

I'am trying to use Docker with Springboot/Kotlin. Everything I do seems to lead to the same ERROR.

FROM maven:3.6.0-jdk-8-alpine
ADD pom.xml /
ADD . /
RUN mvn package
FROM openjdk:8-jdk-alpine
WORKDIR /root/
COPY --from=0 /target/*-jar-with-dependencies.jar app.jar

EXPOSE 8081

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom",".app.jar"]
package com.ob.stltool

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication

@SpringBootApplication
class StltoolApplication

fun main(args: Array<String>) {
    runApplication<StltoolApplication>(*args)
}
Christian
  • 33
  • 3
  • Does you jar have a manifest? – Mureinik Aug 27 '21 at 12:40
  • I'm not sure. I just started learning, but I don't think so. – Christian Aug 27 '21 at 12:53
  • In your pom.xml , have you added the main class. You can check the configuration in the answer - https://stackoverflow.com/questions/29920434/maven-adding-mainclass-in-pom-xml-with-the-right-folder-path – Sujay Mohan Aug 27 '21 at 17:30
  • `ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom",".app.jar"]` you need to add `-jar` before `"app.jar"` for the java command line – guido Aug 27 '21 at 18:05

0 Answers0