Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
caching steps using git pull
RUN git clone x
ARG CACHEBUST=1
RUN git pull
RUN npm install
# the problem is that npm install will always run
# but we can do this instead
RUN git clone x
ADD https://github.com/whatever/package.json package.json
RUN npm install
ARG CACHEBUST=1
RUN git pull
# so the ADD call is the key thing here
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.