You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior
When building my images and multi stages images with --cache-copy-layer at false (or not definied) I was surprised to find that in multi stages images only, kaniko pushes cache layers to target registry.
I always get the following log entry in my multi stages images : INFO[0033] Pushing layer REDACTED/REDACTED/REDACTED/cache:REDACTED to cache now
I think that command arguments are not correctly propagated through build workflow on multi-stage docker images ?
Expected behavior
I expect that --copy-cache-layers=false work with single stage images and multi stages images, but it only works partialy in mutli-stage images
I'd probably bias toward fewer flags in general, unless there's some strong reason you'd expect folks to only want to cache one type and not the other.
Thanks for looking into this, and thanks for sending a PR!
Actual behavior
When building my images and multi stages images with --cache-copy-layer at false (or not definied) I was surprised to find that in multi stages images only, kaniko pushes cache layers to target registry.
I always get the following log entry in my multi stages images :
INFO[0033] Pushing layer REDACTED/REDACTED/REDACTED/cache:REDACTED to cache now
I think that command arguments are not correctly propagated through build workflow on multi-stage docker images ?
The function pushing cache layers : https://github.com/GoogleContainerTools/kaniko/blob/main/pkg/executor/push.go#L291 if you check call stack it should be called only when CopyCacheLayers is enabled.
Expected behavior
I expect that
--copy-cache-layers=false
work with single stage images and multi stages images, but it only works partialy in mutli-stage imagesTo Reproduce
Steps to reproduce the behavior:
Additional Information
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: