kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

RUN Layers are not being cached properly

Open UmairShahid95 opened this issue 1 year ago • 2 comments

Actual behavior The following directive:

RUN apt-get update -y &&
apt-get install -y postgresql-client

gets cached but the cache is not used in the subsequent runs --cache=true is activated

Expected behavior

it should be cached properly and cache should be utilized in subsequent runs

UmairShahid95 avatar Jul 15 '24 16:07 UmairShahid95

Same issue here. For

RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
    nginx tini libpango-1.0-0 libpangoft2-1.0-0 && \
    rm -rf /var/cache/apt/archives/*

the cache is never used.

anselms avatar Aug 19 '24 12:08 anselms

BTW, this does not seem to share the root cause with #3246, as we observe this caching problem without using WORKDIR in our Dockerfile (and neither is WORKDIR used in the base image)

anselms avatar Oct 15 '24 10:10 anselms