Open loretoparisi opened 8 years ago
[UPDATE]
Changing the FROM
to FROM mhart/alpine-node:4.4.5
it worked.
Perhaps this is linked to an issue I had yesterday: https://github.com/sass/node-sass/issues/1621#issuecomment-230112175? npm 2.x
not liking --unsafe-perm
but npm 3.x
working fine?
Update: nope. Even with npm 3.x
installed, npm install -g slackin
fails in a container.
> slackin@0.8.3 postinstall /usr/local/lib/node_modules/slackin
> gulp
[15:45:16] Requiring external module babel-core/register
[15:45:17] Using gulpfile /usr/local/lib/node_modules/slackin/gulpfile.babel.js
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open '/root/.babel.json'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.writeFileSync (fs.js:1156:15)
at save (/usr/local/lib/node_modules/slackin/node_modules/babel-register/lib/cache.js:57:40)
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)
npm info lifecycle slackin@0.8.3~postinstall: Failed to exec postinstall script
/usr/local/lib
`-- (empty)
npm ERR! Linux 3.13.0-79-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "slackin"
npm ERR! node v4.2.6
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! slackin@0.8.3 postinstall: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the slackin@0.8.3 postinstall script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the slackin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs slackin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls slackin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /npm-debug.log
npm ERR! code 1
Even updating this to alpine-node, it's still broken:
Sending build context to Docker daemon 545.6 kB
Sending build context to Docker daemon 588.8 kB
Sending build context to Docker daemon 588.8 kB
Step 1 : FROM mhart/alpine-node:4.4.5
---> 523acbf035ed
Step 2 : ENV PORT 3000
---> Using cache
---> f83f2423f0f6
Step 3 : ADD . /srv/www
---> f3a0eb86c358
Removing intermediate container 7d03166b9956
Step 4 : WORKDIR /srv/www
---> Running in d3668abb5250
---> ea6cf392b6ca
Removing intermediate container d3668abb5250
Step 5 : RUN npm install --unsafe-perm
---> Running in 68a5d6e5184a
[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[0m[91mnpm[0m[91m [0m[91mWARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[0m[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated[0m[91m jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
[0m[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated[0m[91m lodash@2.4.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
[0m[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated[0m[91m minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[0m[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated[0m[91m graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[0m[91mnpm[0m[91m [0m[91mWARN [0m[91mdeprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
[0m[91mnpm[0m[91m [0m[91mWARN[0m[91m [0m[91mdeprecated[0m[91m graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[0m[91mKilled
[0mThe command '/bin/sh -c npm install --unsafe-perm' returned a non-zero code: 137
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Notice it says Killed in there? I wonder if something is killing the build process, due perhaps to low memory? Will investigate.
Ok ignore me, my issue is out-of-memory. The docker build takes up > 800 MB of memory.
The
docker
build ends up with