title: Updating npm in Docker image
body: <p>I am building a Node.js Docker image: <code>docker build . -t imagename</code>, however I keep getting warning regarding npm version</p>
  
  <pre><code>npm WARN deprecated This version of npm lacks support for important features,
  npm WARN deprecated such as scoped packages, offered by the primary npm
  npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
  npm WARN deprecated latest stable version. To upgrade to npm@2, run:
  npm WARN deprecated 
  npm WARN deprecated   npm -g install npm@latest-2
  npm WARN deprecated 
  npm WARN deprecated To upgrade to the latest stable version, run:
  npm WARN deprecated 
  npm WARN deprecated   npm -g install npm@latest
  npm WARN deprecated 
  npm WARN deprecated (Depending on how Node.js was installed on your system, you
  npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
  npm WARN deprecated on Windows, run them from an Administrator prompt.)
  npm WARN deprecated 
  npm WARN deprecated If you're running the version of npm bundled with
  npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
  npm WARN deprecated will be bundled with a version of npm@2, which has some small
  npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
  npm WARN deprecated semver behavior.
  </code></pre>
  
  <p>However I have update Node.js version, and it still wouldn't work:</p>
  
  <pre><code>node -v
  v8.9.3
  npm -v
  5.6.0
  </code></pre>
  
  <p>I have ran <code>npm -g install npm@latest</code> but still won't work.</p>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM alpine:3.1
  
  # Update
  RUN apk add --update nodejs
  
  # Install app dependencies
  COPY package.json /src/package.json
  RUN cd /src; npm -g install npm@latest
  
  # Bundle app source
  COPY . /src
  
  CMD ["node", "--harmony","/src/app.js"]
  </code></pre>
  
  <p>What could possibly be the cause? I am able to run the app using node just fine.</p>
  
  <p><em>I'm running Ubuntu 16.04.3 LTS</em> </p>