title: how to run multiple npm scripts in docker CMD command
body: <p>I created a Dockerfile for a nodejs project. It contains a package.json with many scripts.</p>
  <pre><code>&quot;scripts&quot;: {
          &quot;start&quot;: &quot;npm run&quot;,
          &quot;server&quot;: &quot;cd server &amp;&amp; npm start&quot;,
          &quot;generator&quot;: &quot;cd generator &amp;&amp; npm start&quot;,
  ...
      },
  </code></pre>
  <p>I need to run <code>server</code> and <code>genberator</code> in my docker image. How to achieve this?</p>
  <p>I tried:</p>
  <p><code>CMD ls;npm run server ; npm run generator </code> this won't find the package json because shellform seems to run within <code>/bin/sh -c</code>.</p>
  <p><code>CMD [&quot;npm&quot;,&quot;run&quot;,&quot;server&quot;]</code> is also not working and is missing the 2nd command</p>
  <p>The ls in first try showed me that all files are in place (incl. the package.json).</p>
  <p>For sake of completeness the project in question is <a href="https://github.com/seekwhencer/node-bilder-brause" rel="nofollow noreferrer">https://github.com/seekwhencer/node-bilder-brause</a> (not mine).
  the current Dockerfile:</p>
  <pre><code>FROM node:14
  
  # Create app directory
  WORKDIR /usr/src/app
  
  # Bundle app source
  COPY ./* ./
  
  RUN npm install
  
  EXPOSE 3050
  EXPOSE 3055
  CMD ls ; npm run server ; npm run generator
  </code></pre>