Open emeric-martineau opened 2 years ago
I found another case:
FROM gcr.io/kaniko-project/executor:v1.9.1 as kaniko
FROM ubuntu:22.04 as target
ENV TERM xterm
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir -p /kaniko/
COPY --from=kaniko /kaniko/executor /kaniko/executor
COPY --from=kaniko /kaniko/docker-credential-gcr /kaniko/docker-credential-gcr
COPY --from=kaniko /kaniko/docker-credential-ecr-login /kaniko/docker-credential-ecr-login
COPY --from=kaniko /kaniko/docker-credential-acr-env /kaniko/docker-credential-acr-env
COPY --from=kaniko /kaniko/ssl/certs/ /kaniko/ssl/certs/
COPY --from=kaniko /kaniko/.docker /kaniko/.docker
COPY --from=kaniko /etc/nsswitch.conf /etc/nsswitch.conf
ENV SSL_CERT_DIR=/kaniko/ssl/certs
ENV DOCKER_CONFIG /kaniko/.docker/
ENV DOCKER_CREDENTIAL_GCR_CONFIG /kaniko/.config/gcloud/docker_credential_gcr_config.json
RUN echo "ddd" > /toto
if I remove RUN mkdir -p /kaniko/
I don't have issue.
No issue if I use Docker to build
Actual behavior When we copy file from another image:
and create a link (sym or hard) on this:
the folder
/kaniko
is removed.Same behavior if create a file in
/kaniko
folder:Expected behavior Buildkit compatibility. With buildkit link exists and
/kaniko/
is keep.To Reproduce Create a image with this Dockerfile:
Error happend when we use docker image
gcr.io/kaniko-project/executor:v1.9.1
Additional Information Workaround:
Triage Notes for the Maintainers
--cache
flag