npm on davidchua https://dchua.com/tags/npm/ Recent content in npm on davidchua Hugo -- gohugo.io en-us Fri, 17 Jun 2016 00:00:00 +0000 Speed up NPM install in Docker Containers https://dchua.com/posts/2016-06-17-speed-up-npm-install-in-docker-containers/ Fri, 17 Jun 2016 00:00:00 +0000 https://dchua.com/posts/2016-06-17-speed-up-npm-install-in-docker-containers/ NPM installs in your docker containers getting slow, make sure you set registry! # Dockerfile RUN npm config set registry http://registry.npmjs.org/ && npm install --no-optional --verbose Try this the next time your NPM install feel like its taking forever. Getting npm packages to be installed with docker-compose https://dchua.com/posts/2016-02-07-getting-npm-packages-to-be-installed-with-docker-compose/ Sun, 07 Feb 2016 00:00:00 +0000 https://dchua.com/posts/2016-02-07-getting-npm-packages-to-be-installed-with-docker-compose/ If you’re trying to deploy your node app into a docker container and you’re also using docker-compose, here’s something to watch out for. If you are running npm install on your Dockerfile, you might want to make sure that you mount /node_modules as a data volume in your docker-compose. For eg. your Dockerfile might look something like this: # Dockerfile FROM node:5.5.0 ADD ./ /node_app WORKDIR /node_app RUN npm install Normal stuff.