免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年2月13日 星期五

docker, CMD, EntryPoint


//=== 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.


..."""



沒有留言:

張貼留言