Created
May 3, 2019 02:50
-
-
Save ORESoftware/db551c699d0513d7c114bb6174a8234e to your computer and use it in GitHub Desktop.
caching steps using git pull
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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