-
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
Multi Stage build not respecting dependency tree #815
Comments
Same here. I would also add, that if there is no dependencies at all, kaniko will build all unwanted stages in order which they are declared in Dockerfile till it comes to target. Luckly, if target is the first stage, other stages are not initiates :) |
Pardon my ignorance, is there a corollary functionality in docker build? |
This may be the same issue as #775 |
If you use DOCKER_BUILDKIT=1, dependencies resolved correctly. |
Yep, being burned by this. Migrating to GitLab CI with existing multi-stage builds which were using eg. |
Actual behavior
Kaniko builds all stages of a multi stage then only returns the stage specified in the
--target
declaration.Expected behavior
Kaniko should only build the stages that the
--target
has as dependencies.To Reproduce
Multi stage file like this:
I would expect that when building this file with
--target
=deployable
that the test layers would not be built. Partly because they are not used so they will just be thrown away.Current versions of docker do this dependency mapping to only build required steps.
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: