Skip to content

Instantly share code, notes, and snippets.

@dweinstein
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dweinstein/9550778 to your computer and use it in GitHub Desktop.
Save dweinstein/9550778 to your computer and use it in GitHub Desktop.
Avoid doing an `npm install` after an `ADD .` command
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install python-software-properties git build-essential
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get -y install nodejs
WORKDIR /opt/app
ADD . /opt/app
RUN npm install
EXPOSE 3001
CMD ["node", "server.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment