My docker file looks like this:
FROM openjdk:9
VOLUME /tmp
ADD target/myjar-1.0-SNAPSHOT.jar app.jar
ENTRYPOINT [“java”,”-jar”,”/app.jar”]
When I run docker build -t myjar
it builds fine.
When I run docker run image
I get this error:
/bin/sh: 1: [“java”,”-jar”,”/app.jar”]: not found
I heard this could be a "relative path" issue? I'm not sure how to fix it or where the jar should even reside. I need help debugging this.
This Error occurs only in Windows 10 . Use below command
$> docker container commit --change='CMD java -jar /tmp/app-name.jar' <container_name> <docker_registry>/app-name:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With