This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Description
Actual behavior
If a folder is created from cache over an invalid symlink, kaniko fails to create the directory
Expected behavior
Build behaves the same whether it's from scratch or from cache
To Reproduce
FROM ubuntu
RUN mkdir /test \
&& ln -s /test /link
RUN rm -rf /test /link \
&& mkdir /link
WORKDIR /app
note that this will only fail on the second build, when we try to unpack the cache.
WORKDIR is used to invalidate the cache #3340