Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

292
Visualizações
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
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

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.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda