GoogleContainerTools / kaniko

Build Container Images In Kubernetes
Apache License 2.0
14.88k stars 1.44k forks source link

--kaniko-dir is not used for the context, only for the Dockerfile #3281

Open rabejens opened 3 months ago

rabejens commented 3 months ago

Actual behavior When I am building an image with the Kaniko executor and specify --kaniko-dir, this only applies to the Dockerfile, not to the context

Expected behavior The Kaniko-Dir should be used for everything

To Reproduce Steps to reproduce the behavior:

Run this:

executor --kaniko-dir /somewhere --dockerfile /somewhere-else/Dockerfile --context /somewhere-else --no-push --tar-path container.tar

Additional Information

andydix commented 3 months ago

Following with interest as I'm having issues related to this too.

I use a Persistent Volume for all build files but still Kaniko uses the worker node's ephemeral disk far too much and on a shared CI/CD setup the node is frequently running out of space.