Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
docker run image causes syntax error /bin/sh

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
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!