-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COPY to symlink destination behaviour differs from docker build #1658
Comments
Any word on this? This behavior is mentioned in at least 3 issues, but none of them have any updates in them. |
No updates at this time. Kaniko is effectively staffed and maintained on a best-effort basis currently. That may change, but for now it's a pretty skeleton crew. I try to fix things when I can, and get notifications about issue comments like this, but I'm far from an expert, and don't have much time to dedicate to it. If you're able to identify a fix, I'm happy to review and merge the PR (especially if it includes tests!!). |
I am trying to build an image containing a node app that manages dependencies using symlinks which seems to cause kaniko to fail during a COPY operation.
Stripping away any unrelated details, I am basically trying to build this image:
Actual behavior
The build works as expected until it reaches the line
COPY --from=BASE /usr/src/app/packages/scripts /app/node_modules/sourced-scripts
where it should copy the scripts folder from the
BASE
stage into the target of the symlink/app/node_modules/sourced-scripts
in theTARGET
stage. However, it fails with this error instead:building image: error building stage: failed to execute command: resolving dest symlink: failed to eval symlinks: lstat /app/packages: no such file or directory
The error indicates to me that kaniko is expecting the target path of the symlink to exist before the copy operation is executed.
Expected behavior
I would expect that kaniko would ignore the fact that the path of the symlink target does not exist yet and create it as part of the copy operation instead. This seems to be what
docker build
is doing for instance, as the dockerfile above works fine with standard docker.If I am not mistaken, this is also the general semantics of the copy command, i.e. if the target path does not exist it should be created as needed.
To Reproduce
Steps to reproduce the behavior:
Additional Information
gcr.io/kaniko-project/executor@sha256:e61c08a27311884ff0d39a3ed4467f3c23444d73e03387fc9c7d5c6442796bae
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: