Skip to content

chore: drop kaniko dependency - #2677

Open
mzihlmann wants to merge 1 commit into
buildpacks:mainfrom
mzihlmann:drop-kaniko-dependency
Open

chore: drop kaniko dependency#2677
mzihlmann wants to merge 1 commit into
buildpacks:mainfrom
mzihlmann:drop-kaniko-dependency

Conversation

@mzihlmann

@mzihlmann mzihlmann commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Hi 👋

Full disclosure, I maintain osscontainertools/kaniko, a competing kaniko fork.

pack imports one function from kaniko, to ask whether it is running in a container:

pkg/client/build.go:60         proc.GetContainerRuntime(0, 0) != proc.RuntimeNotFound
pkg/cache/volume_cache.go:133  proc.GetContainerRuntime(0, 0) != proc.RuntimeNotFound

it uses none of the core features of kaniko and as such I think it should not depend on it and rather inline that single function.

Documentation

  • Should this change be documented?
    • No

Related

@alphanota found this in #2508. That PR switches fork, which clears the duplicate but keeps a dependency pack does not need. This one removes it.

kaniko does not leave the graph, and is not meant to. lifecycle applies Dockerfiles with it for image extensions, and moved to osscontainertools/kaniko at v0.21.17. pack pins lifecycle v0.21.0, which still carries chainguard-dev/kaniko, so after this go list -m all | grep kaniko still shows that one, at v1.25.5 rather than v1.25.16 now that lifecycle's floor is the only one left. Bumping lifecycle then leaves you with one fork instead of two.

go list -m all on current main, for each option:

today switch (#2508) inline (this)
lifecycle v0.21.0 566, one fork 567, both forks 540, one
lifecycle v0.21.17 559, both forks 553, one fork 528, one

Switching leaves pack importing a kaniko package, so Go keeps loading kaniko's own requirements and the GCP, envoy and spiffe modules stay in the graph. Not importing it prunes them.

@mzihlmann
mzihlmann requested review from a team as code owners August 19, 2026 22:01
@mzihlmann
mzihlmann force-pushed the drop-kaniko-dependency branch from 11372e7 to 9834dda Compare August 19, 2026 22:03
@mzihlmann mzihlmann changed the title chore: inline container runtime detection and drop the kaniko dependency chore: drop kaniko dependency Aug 19, 2026
@github-actions github-actions Bot added this to the 0.41.0 milestone Aug 19, 2026
@github-actions github-actions Bot added type/enhancement Issue that requests a new feature or improvement. type/chore Issue that requests non-user facing changes. labels Aug 19, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Martin Zihlmann <martizih@outlook.com>
@mzihlmann
mzihlmann force-pushed the drop-kaniko-dependency branch from 9834dda to 533e44f Compare August 19, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/chore Issue that requests non-user facing changes. type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant