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

350
Vistas
I get an error when running the Dockerfile

So I've built an image with docker build -t myimage2:1.0 .

This is my Dockerfile:

#getting base image
FROM ubuntu

MAINTAINER gilebrt <email@bla.com>

RUN apt-get update

CMD ["echo", "Hello World"]

But when running docker run myimage2:1.0, I get the error below

/bin/sh: 1: [“echo”,”Hello: not found

I tried changing the CMD line, among other things to: CMD "echo hello World", but I still get the error:

/bin/sh: 1: echo hello World: not found

I am using Ubuntu 16.04.6 LTS
I am sure it's something silly, but I can't find the issue... Thanks in advance!

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You should wrap "Hello World" with quotes, otherwise it will execute as echo Hello World, which is not valid, it should be echo "Hello World".

#getting base image
FROM ubuntu

MAINTAINER gilebrt <email@bla.com>

RUN apt-get update

CMD ["echo", "\"Hello World\""]
over 4 years ago · Santiago Trujillo Denunciar

0

CMD ["echo", "Hello World"] would do.

over 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