Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

291
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda