--kaniko-dir is not used for the context, only for the Dockerfile
Author: rabejensCreated Aug 7, 2024Updated May 29, 2025
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.tarAdditional Information
- Dockerfile Happens with any Dockerfile
- Build Context Happens with any build context
- Kaniko Image (fully qualified with digest)
No image, using
kanikofrom 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 |
|
Source: GoogleContainerTools/kaniko