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

前端 未结 16 1755
自闭症患者
自闭症患者 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:31

    CMD command mentioned inside Dockerfile file can be overridden via docker run command while ENTRYPOINT can not be.

提交回复
热议问题