Expected behavior
npm install
should install all the modules and end with ‘ok’. Running npm install
on the host system using the same package.json completes successfully
Actual behavior
npm ERR! Linux 4.4.9-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! path /src/node_modules/acorn/bin/acorn
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/src/node_modules/acorn/bin/acorn'
npm ERR! enoent ENOENT: no such file or directory, chmod '/src/node_modules/acorn/bin/acorn'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /src/npm-debug.log
Or, sometimes:
npm ERR! Linux 4.4.9-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.11.0
npm ERR! npm v3.8.6
npm ERR! path /src/node_modules/body-parser/node_modules
npm ERR! code EEXIST
npm ERR! errno -17
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir '/src/node_modules/body-parser/node_modules'
npm ERR! File exists: /src/node_modules/body-parser/node_modules
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /src/npm-debug.log
Information
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160518-211729.tar.gz
Most specific failure is: No error was detected
Your unique id is: 76C69662-2BBB-495B-84DC-CD632C441871
Version 1.11.1-beta12 (build: 7528)
OSX 10.11.4 (15E65)
Steps to reproduce the behavior
Create a new dockerfile as follows:
FROM node:6.2.0-slim
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -yq update && apt-get -yq install git bzip2 automake build-essential
RUN npm install -g --silent ember-cli@2.5.0 bower@1.7.1 phantomjs@1.9.19
# Add an ember user because bower doesn't like being root
RUN adduser --disabled-password --gecos "" ember && \
echo "ember ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN \
git clone https://github.com/facebook/watchman.git &&\
cd watchman &&\
git checkout v3.5.0 &&\
./autogen.sh &&\
./configure &&\
make &&\
make install
ENV LANG en_GB.UTF-8
RUN mkdir /src && chown ember:ember /src
WORKDIR /src
# Always run as the yeoman user
USER ember
CMD [ "ember", "server" ]
Build it
docker build -t docker-ember .
Create the following package.json:
{
"name": "src",
"version": "0.0.0",
"description": "Small description for src goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"active-model-adapter": "2.1.1",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "0.7.1",
"ember-cli": "2.5.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-bootstrap-sassy": "0.5.3",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-mirage": "0.1.13",
"ember-cli-moment-shim": "1.1.0",
"ember-cli-qunit": "^1.4.0",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "5.3.1",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.5.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-moment": "6.1.0",
"ember-resolver": "^2.0.3",
"ember-route-action-helper": "0.3.1",
"ember-truth-helpers": "1.2.0",
"loader.js": "^4.0.1"
}
}
Run npm install:
docker run -it --rm -v $(pwd):/src docker-ember npm install