What is the difference between CMD and ENTRYPOINT in a Dockerfile?

前端 未结 16 1735
自闭症患者
自闭症患者 2020-11-21 22:31

In Dockerfiles there are two commands that look similar to me: CMD and ENTRYPOINT. But I guess that there is a (subtle?) difference between them -

16条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-21 23:17

    The accepted answer is fabulous in explaining the history. I find this table explain it very well from official doc on 'how CMD and ENTRYPOINT interact':

提交回复
热议问题