title: Dockerizing a Node.js app on microsoft/nanoserver
body: <p>I am new to Docker. We have a node based REST service and I am trying to create a docker image so that I can easily deploy the service on build agents. I have CD to the folder where we have the package.json of the service and added below docker file. I am on Win 10 build 14xxxxx  and using Docker windows container. Do I need to pull a node image and install it on nanoserver first ?</p>
  <pre><code>FROM microsoft/nanoserver
  
  # Create app directory
  RUN powershell New-Item -ItemType directory -Path \usr\src\app
  WORKDIR \usr\src\app
  
  # Install app dependencies
  COPY package.json \usr\src\app
  RUN npm install
  
  # Bundle app source
  COPY . \usr\src\app
  
  EXPOSE 8080
  
  CMD [ &quot;npm&quot;, &quot;start&quot; ]
  </code></pre>
  <p>When I run</p>
  <pre><code>docker build -t mycompany/node-engine
  </code></pre>
  <p>I am getting below error</p>
  <pre><code>'npm' is not recognized as an internal or external command,
      operable program or batch file.
  </code></pre>
  <p>Below is the full output</p>
  <pre><code>Sending build context to Docker daemon 24.67 MB
  Step 1/8 : FROM microsoft/nanoserver
   ---&gt; a943c29f0046
  Step 2/8 : RUN powershell New-Item -ItemType directory -Path \usr\src\app
   ---&gt; Using cache
   ---&gt; f1df2109ddd6
  Step 3/8 : WORKDIR \usr\src\app
   ---&gt; Using cache
   ---&gt; 66d552a76612
  Step 4/8 : COPY package.json \usr\src\app
   ---&gt; Using cache
   ---&gt; fcf9663854c3
  Step 5/8 : RUN npm install
   ---&gt; Running in b47b47ad1439
  'npm' is not recognized as an internal or external command,
  operable program or batch file.
  The command 'cmd /S /C npm install' returned a non-zero code: 1
  </code></pre>