Skip to content

Commit

Permalink
feat(docker): Speed up repeated Docker builds with code-only changes
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejulius committed Sep 13, 2018
1 parent f7cfc31 commit 8bf24c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ RUN apt-get update && apt-get install -y bzip2 && rm -rf /var/lib/apt/lists/*
ENV WORKDIR /code/pelias/pip-service
WORKDIR ${WORKDIR}

# copy package.json first to prevent npm install being rerun when only code changes
COPY ./package.json ${WORKDIR}
RUN npm install

# copy code from local checkout
ADD . ${WORKDIR}

# install npm dependencies
RUN npm install

# run tests
RUN npm test

Expand Down

0 comments on commit 8bf24c7

Please sign in to comment.