title: Docker run command ignoring part of Dockerfile CMD when ENTRYPOINT present
body: <p>When I run my docker container, it appears to only be honouring the first element of the CMD array (python executable) and ignoring the trailing parameters.</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM ubuntu:14.04
  
  ENTRYPOINT ["/bin/bash", "-c"]
  CMD ["/virtualenv/bin/python", "/mycode/myscript.py", "--param1"]
  </code></pre>
  
  <p>Run command:</p>
  
  <pre><code>$ docker run --rm -it --volume $(pwd)/..:/mycode --volume mycontainer-virtualenv:/virtualenv mycontainer
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Python 3.4.3 (default, Oct 14 2015, 20:28:29)
  [GCC 4.8.4] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Same happens if I run <code>--detach</code> instead of <code>-it</code>.</p>
  
  <p>Same also happens if I run with the CMD as an overriding docker run parameter:</p>
  
  <pre><code>$ docker run --rm -it --volume $(pwd)/..:/mycode --volume mycontainer-virtualenv:/virtualenv mycontainer /virtualenv/bin/python /mycode/myscript.py --param1
  Python 3.4.3 (default, Oct 14 2015, 20:28:29)
  [GCC 4.8.4] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt;
  </code></pre>
  
  <p>If I run the container with bash and run the CMD from the bash prompt, it works fine:</p>
  
  <pre><code>$ docker run --rm -it --volume $(pwd)/..:/mycode --volume mycontainer-virtualenv:/virtualenv mycontainer bash
  root@d6a990e81c22:/# /virtualenv/bin/python /mycode/myscript.py --param1
  Hello world!
  </code></pre>