nodeJS dockerfile build failing with NPM
<p>I am trying to create a docker container for NODEJS and get it to run a nodejs application.</p>

<p>It is failing on the npm install step with</p>

<pre><code>The command '/bin/sh -c npm install' returned a non-zero code: 1
</code></pre>

<p>This is the dockerfile</p>

<pre><code>FROM node:onbuild

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app/
RUN sudo npm install

# Bundle app source
COPY . /usr/src/app

EXPOSE 8080
CMD [ "npm", "start" ]
</code></pre>

<p>and this is the package.json</p>

<pre><code>{
  "private": true,
  "devDependencies": {
    "gulp": "^3.8.8"
  },
  "dependencies": {
    "bootstrap-sass": "^3.0.0",
    "express": "^4.13.4",
    "ioredis": "^1.15.1",
    "laravel-elixir": "^4.0.0",
    "socket.io": "^1.4.5"
  }
}
</code></pre>

<p>and this is the build command I am running</p>

<pre><code> docker build -t jachno/nodejs .
</code></pre>

<p>it runs for ages pull loads of stuff in and then fails with an exit code of 1.</p>

<p>any ideas?</p>