When I run docker command on my image, it errors out. Any ideas on what should I include in my Dockerfile for CMD? Currently I have java -jar my.jar in it.
docker run startlog
/bin/sh: 1: Syntax error: Unterminated quoted string
From your comment (this should really be an edit to your question):
FROM openjdk:8
RUN mkdir -p /tmp/startlog/
ADD gs-rest-hateoas-0.1.0.jar /tmp/startlog/
EXPOSE 8080
ENTRYPOINT ["java", "-jar", “/tmp/startlog/gs-rest-hateoas-0.1.0.jar"]
you do not have a double quote in front of /tmp/startlog, instead you have a "smart quote" which is invalid for programming. Please ditch whatever editor created that and don't use it for any more coding.
What happened with the smart quote is that the entrypoint json was not valid json, so it gets run as
/bin/sh -c '["java", "-jar", “/tmp/startlog/gs-rest-hateoas-0.1.0.jar"]'
And before /bin/sh looks for the command ["java", it sees a parsing problem with the unmatched quotes.
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