Skip to content

Specify --custom-platform when building non-host platform images

Ben Gamari requested to merge wip/fix-kaniko-2 into master

For reasons that are a bit unclear, Kaniko now rejects some (but, strangely, not all) images whose platforms don't match that of the host machine. This appears to be the (allegely fixed) issue reported in [1].

Since Docker is awful and life is short, here we use the workaround proposed in the ticket, using --customPlatform to override the image platform, coercing Kaniko to do as we say.

[1] https://github.com/GoogleContainerTools/kaniko/issues/1995

Merge request reports