Skip to content

Commit

Permalink
Created cached layer for node_modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
longieirl committed Apr 6, 2015
1 parent 3d8de52 commit 8a2c88d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ RUN apt-get update && \
# Install nodemon
RUN npm install -g nodemon

# Bundle app source
COPY . /src
# Provides cached layer for node_modules
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /src && cp -a /tmp/node_modules /src/

# Install app dependencies
RUN cd /src; npm install
# Define working directory
WORKDIR /src
ADD . /src

# Expose port
EXPOSE 8080
Expand Down

0 comments on commit 8a2c88d

Please sign in to comment.