Open phongvq opened 2 years ago
Based on the logs, I guess the cause is:
RUN echo abc
doesn't cause file system change -> no snapshot was doneRUN echo abc
was not found -> cache of all layer after echo
layer will not be valid -> and all instruction will be executed.Please correct me if I am wrong. Thanks very much.
Actual behavior
RUN echo helloworld
) (cache of any layers after that instruction will be invalidate in the next build)Expected behavior
To Reproduce
RUN echo helloworld
in DockerfileRUN npm i -g npm@8.2.0
WORKDIR /app COPY package.json . COPY package-lock.json .
echo abc will not cause any change in filesystem
RUN echo abc
################## cache of layers after this line cannot be re-used in the next build. COPY .npmrc .
RUN npm ci
COPY . . RUN GENERATE_SOURCEMAP=false npm run build
Additional Information
--cache-copy-layers
set totrue
--snapshotMode
flag fromredo
tofull
does not show the issuebuild no. 1
build no. 2
Triage Notes for the Maintainers
--cache
flag