title: Can't build a Docker container for Node app based on node:8.1 image
body: <p>I'm trying to create a container for my app based on the <code>node:8.1</code> image using the following Dockerfile:</p>
  
  <pre><code>FROM node:8.1.4
  
  
  RUN mkdir /home/node/.npm-global ; \
      mkdir -p /home/node/app ; \
      chown -R node:node /home/node/app ; \
      chown -R node:node /home/node/.npm-global
  ENV PATH=/home/node/.npm-global/bin:$PATH
  ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
  
  USER node
  
  WORKDIR /home/node/app
  
  # Just for dev
  RUN npm install mocha knex nodemon -g --quiet
  
  # Opting for COPY over ADD as there is no need of auto extracting any compressed file
  COPY . /home/node/app
  
  RUN npm install --quiet
  
  CMD node
  </code></pre>
  
  <p>However, when it is running <code>npm install --quiet</code> I get these messages:</p>
  
  <pre><code>npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
  npm WARN checkPermissions Missing write access to /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist
  npm WARN checkPermissions Missing write access to /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp
  npm WARN checkPermissions Missing write access to /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev
  npm WARN checkPermissions Missing write access to /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/nopt
  npm WARN checkPermissions Missing write access to /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates
  </code></pre>
  
  <p>The message repeats for every package in package.json.</p>
  
  <p>And finishes with:</p>
  
  <pre><code>npm ERR! path /home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist
  npm ERR! code EACCES
  npm ERR! errno -13
  npm ERR! syscall access
  npm ERR! Error: EACCES: permission denied, access '/home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist'
  npm ERR!  { Error: EACCES: permission denied, access '/home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist'
  npm ERR!   errno: -13,
  npm ERR!   code: 'EACCES',
  npm ERR!   syscall: 'access',
  npm ERR!   path: '/home/node/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist' }
  npm ERR!
  npm ERR! Please try running this command again as root/Administrator.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/node/.npm/_logs/2017-07-12T15_51_42_496Z-debug.log
  ERROR: Service 'api' failed to build: The command '/bin/sh -c npm install --quiet' returned a non-zero code: 243
  </code></pre>
  
  <p>Previously with node:7.1 I've been able to make it work without having to change the current user to <code>node</code>.</p>
  
  <p>How can I make my app deploy work with the latest version of this image?</p>