2

I have such dockerfile:

FROM ubuntu
CMD "Hello docker!"
ENTRYPOINT echo

I build image as following:

docker build -t mydocker .

Then I run it:

docker run --name mydocker1 -t mydocker

But as output I see only empty string, I exptected to see "Hello docker1" though. I tried to also:

docker logs mydocker1

It gives me empty string too.

How to do it correctly?

Kenenbek Arzymatov
  • 8,439
  • 19
  • 58
  • 109

1 Answers1

1

Use it in the following manner :

FROM ubuntu:14.04
CMD ["Hello docker!"]
ENTRYPOINT ["echo"] 
Rambler
  • 4,994
  • 2
  • 20
  • 27