docker: npm install on docker start
<p>I'd like to have some kind of "development docker image" in which <code>npm install</code> is executed every time I restart my Docker Container (becuase I don't want to build, push and pull the new dev image every day from my local machine to our Docker server).
So I thought I could do sth. like this in my Dockerfile:</p>

<pre><code>CMD npm install git+ssh://git@mycompany.de/my/project.git#develop &amp;&amp; npm start
</code></pre>

<p>Sadly, this doesn't work. The container stops immediately after <code>docker start</code> and I don't know why, because this works:</p>

<pre><code>RUN npm install git+ssh://git@mycompany.de/my/project.git#develop
CMD npm start
</code></pre>

<p>(Just for testing, that's of course not what I want to have). But maybe I have some wrong perception of <code>CMD</code> and someone could enlighten me?</p>