kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

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

Open rabejens opened this issue 1 year ago • 2 comments

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

  • Dockerfile Happens with any Dockerfile
  • Build Context Happens with any build context
  • Kaniko Image (fully qualified with digest) No image, using kaniko from nixpkgs when building a derivation

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
  • - [ ]
Please check if the build works in docker but not in kaniko
  • - [ ]
Please check if this error is seen when you use --cache flag
  • - [ ]
Please check if your dockerfile is a multistage dockerfile
  • - [ ]

rabejens avatar Aug 07 '24 17:08 rabejens

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.

andydix avatar Aug 14 '24 13:08 andydix

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.

Hi, I have already encountered this issue, did you find some solutions?

Sodawyx avatar May 29 '25 11:05 Sodawyx