Open ivanchubb opened 1 month ago
Upvote for this report since I'm facing a very similar issue.
could you be looking for the --cleanup
flag?
https://github.com/GoogleContainerTools/kaniko#flag---cleanup
could you be looking for the
--cleanup
flag?https://github.com/GoogleContainerTools/kaniko#flag---cleanup
Just tried that and it doesn't help
I have a similar problem. I observed that when using kaniko to build multiple levels, Example command: /kaniko/executor --context dir:///{codePath} ... When the Dockerfile contains the following command COPY --from={baseImage} /{targetPath} After the COPY command is executed, {codePath} will be cleared. I am not sure why
After executing COPY --from=, execute ADD . .
Actual behavior
When executing a multi-stage build (particularly evident when the last stage is
FROM scratch
) after theexecutor
finishes, the rest of the script in the CI job maintains the context of the built image instead of reverting back to the context of the image defined at the job level. This causes unexpected errors when trying to do any parsing or log aggregation after running the exeuctor.Expected behavior
Expected behavior is after the executor completes, the shell would return to the context of the image specified in the CI job.
To Reproduce Steps to reproduce the behavior:
FROM scratch
kaniko:1.23.2
where the executor is ran.kaniko:1.23.2
, but not in the final stage of the Dockerfile (for example:sed
). The command will fail with "sed
not found".Additional Information
Kaniko Image (1.23.2)
Triage Notes for the Maintainers
--cache
flag