Expected behaviour
Should be able to execute ‘npm install’
Actual behaviour
Massive numbers of errors ranging from ENOENT, EEXIST, general write IO errors
Information
Pinata Diagnose:
OS X: version 10.11.5 (build: 15F34)
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 run command: "docker run -it --rm -v local-folder:/usr/app -w /usr/app mhart/alpine-node:latest sh -c “apk add --no-cache --virtual .npm-deps git python make gcc linux-headers alpine-sdk && /usr/bin/npm set progress=false && /usr/bin/npm install”
Package.json in question:
{ "name": "app", "version": "0.0.1", "description": "", "main": "app.js", "author": "", "license": "ISC", "devDependencies": { "chai": "^3.0.0", "mocha": "^2.2.5", "sinon": "^1.15.3", "jsdoc":"3.4.0", "jshint":"2.9.1-rc1", "jscs":"2.6.0" }, "dependencies": { "nodemon":"1.9.1", "restify":"4.0.4", "bunyan":"1.5.1", "sigyan":"0.2.0", "trace-event":"1.3.0", "consul":"0.19.0", "fluent-logger-stream":"https://github.com/cjpark87/fluent-logger-nodejs.git", "async":"1.5.0", "uuid":"2.0.1", "restify-url-semver":"*", "validator":"4.4.0", "mongodb":"2.0.52", "kerberos":"0.0.17", "mongoose":"4.3.4", "bunyan-prettystream":"0.1.3", "redis":"2.6.0-0", "redis-connection-pool":"https://github.com/davefinster/node-redis-connection-pool.git", "assert-plus":"1.0.0", "request-scrubber":"https://github.com/docketbook/request-scrubber.git", "lodash":"4.8.2", "consul-microagent":"https://github.com/docketbook/consul-microagent.git", "bunyan-logstash-tcp":"0.3.4", "thinky":"https://github.com/davefinster/thinky.git", "bluebird-events":"2.0.0" }, "directories": { "test": "test" }, "scripts": { "test": "./node_modules/mocha/bin/mocha test/uoapi", "start": "node app.js" } }
Actual result:
npm WARN enoent ENOENT: no such file or directory, open '/usr/app/node_modules/CBuffer/package.json' [...lots more...] npm ERR! Linux 4.4.9-moby npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v6.2.0 npm ERR! npm v3.9.0 npm ERR! path /usr/app/node_modules/bunyan-logstash-tcp/node_modules npm ERR! code EEXIST npm ERR! errno -17 npm ERR! syscall mkdir npm ERR! EEXIST: file already exists, mkdir '/usr/app/node_modules/bunyan-logstash-tcp/node_modules' npm ERR! File exists: /usr/app/node_modules/bunyan-logstash-tcp/node_modules npm ERR! Move it away, and try again.
At this stage npm is completely unusable for me when used inside a mounted volume. If I copy the package.json to a folder within the containers normal file system, there are no issues at all and I’m able to install all packages successfully.
This issue appears to have manifested itself with the latest beta, is it possible to download an earlier beta version?
I also see the same errors if I perform an npm install in a normal non-volume folder but then attempt to copy the files manually into a volume mounted folder.