//=== http://stackoverflow.com/questions/21553353/what-is-the-difference-between-cmd-and-entrypoint-in-a-dockerfile
"""...
Docker has a default entrypoint which is /bin/sh -c but does not have a default command.
...
When you run docker like this: docker run -i -t ubuntu bash
... the actual thing that gets executed is /bin/sh -c bash.
... docker run -i -t ubuntu. You will still start a bash shell in the container
because of the ubuntu Dockerfile specified a default CMD: CMD ["bash"] ...
... docker run redisimg redis -H something -u toto get key, you can simply have
ENTRYPOINT ["redis", "-H", "something", "-u", "toto"] and then
... docker run redisimg get key.
..."""
2015年2月13日 星期五
docker, CMD, EntryPoint
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言