Skip to content
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

Creating a custom kaniko image using a multi-stage Dockerfile fails #3122

Open
markusmauch opened this issue Apr 19, 2024 · 0 comments
Open

Comments

@markusmauch
Copy link

Actual behavior
Creating a custom kaniko image using the following multi-stage Dockerfile fails:

FROM gcr.io/kaniko-project/executor:latest as kaniko
FROM alpine:latest as alpine
COPY --from=kaniko /kaniko/.config /kaniko/.config
COPY --from=kaniko /kaniko/.docker /kaniko/.docker
COPY --from=kaniko /kaniko/executor /kaniko/executor
COPY --from=kaniko /kaniko/ssl /kaniko/ssl
COPY --from=kaniko /kaniko/warmer /kaniko/warmer

Error message: Unpacking rootfs as cmd COPY --from=kaniko /kaniko/.config /kaniko/.config requires it.
error building image: error building stage: failed to get files used from context: failed to get fileinfo for /kaniko/0/kaniko/.config: lstat /kaniko/0/kaniko/.config: no such file or directory

Expected behavior
it should not fail

To Reproduce
Start a kaniko build with the above Dockerfile.

Additional Information

  • Kaniko Image: gcr.io/kaniko-project/executor:latest
Description Yes/No
Please check if this a new feature you are proposing no
Please check if the build works in docker but not in kaniko yes
Please check if this error is seen when you use --cache flag yes
Please check if your dockerfile is a multistage dockerfile yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant