Skip to content

Instantly share code, notes, and snippets.

@dweinstein dweinstein/Bad-Dockerfile

Last active Aug 29, 2015
What would you like to do?
Avoid doing an `npm install` after an `ADD .` command
FROM ubuntu
RUN echo "deb 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
CMD ["node", "server.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.