I'm trying to get my
Sails.js app up and running using the standard
node Docker image but the build is failing when it tries to
npm install bcrypt.
> [email protected] install /myapp/node_modules/bcrypt > node-gyp rebuild gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: node-v0.10.33.tar.gz local checksum 822ba41f2d77b704ab63e244dfef7431b31893c19bfe3bf228c06b6aff063ed5 not match remote 75dc26c33144e6d0dc91cb0d68aaf0570ed0a7e4b0c35f3a7a726b500edd081e gyp ERR! stack at deref (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:299:20) gyp ERR! stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:340:13) gyp ERR! stack at IncomingMessage.emit (events.js:117:20) gyp ERR! stack at _stream_readable.js:943:16 gyp ERR! stack at process._tickCallback (node.js:419:13) gyp ERR! System Linux 3.16.1-tinycore64 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /pos/node_modules/bcrypt gyp ERR! node -v v0.10.33 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok
Alternatively sometimes it simply fails as follows:
> [email protected] install /myapp/node_modules/bcrypt > node-gyp rebuild Killed
And sometimes it just hangs indefinitely at
> [email protected] install /pos/node_modules/bcrypt > node-gyp rebuild
Dockerfile looks like:
FROM node:0.10.33 # copy the source files into the image ADD . /myapp # Define working directory. WORKDIR /myapp # Install node-gyp as global and ensure it's all clean and tide RUN npm install -g node-gyp && \ node-gyp clean && \ npm cache clean # Install project dependencies RUN npm install # Expose sails port (still in development mind you) EXPOSE 1337 # Define default command. CMD ["node app"]
Things I've tried
- this post in another Stackoverflow thread suggested I should also
RUN apt-get -y install g++but adding that to my
Dockerfilemade no difference and it just reports that
g++ is already the newest version.
- this post suggested I ensure
opensslis installed so I added
RUN apt-get install -y opensslthat that also reported
openssl is already the newest version.
- I've also tried
RUN apt-get install -y build-essentialbut that too reports that it's already the latest version.
I've seen suggestions that Node needs to be installed as a
legacy version, which is something the standard Node image ought to be responsible for, if necessary I believe, so I've also reported this as an issue with the docker-library/node project.
In the meantime, what else ought I try?