title: What is the difference between CMD and ENTRYPOINT in a Dockerfile?
body: <p>In Dockerfiles there are two commands that look similar to me: <code>CMD</code> and <code>ENTRYPOINT</code>. But I guess that there is a (subtle?) difference between them - otherwise it would not make any sense to have two commands for the very same thing.</p>
  <p>The documentation states for <code>CMD</code>-</p>
  <blockquote>
  <p>The main purpose of a CMD is to provide defaults for an executing container.</p>
  </blockquote>
  <p>and for <code>ENTRYPOINT</code>:</p>
  <blockquote>
  <p>An ENTRYPOINT helps you to configure a container that you can run as an executable.</p>
  </blockquote>
  <p>So, what's the difference between those two commands?</p>