jib icon indicating copy to clipboard operation
jib copied to clipboard

fix: Podman image inspect digest for local images

Open mihalyr opened this issue 6 months ago • 1 comments

When using docker:// prefix to use a base image from the local docker daemon, Jib expects the {{.Id}} field from the docker image inspect output to contain a valid image digest prefixed with sha256:. However, with Podman this is not the case and such builds fail with an "Invalid digest" exception, because Podman returns only the 64-char hash value in the {{.Id}} field without the sha256: prefix.

CliDockerClient already has the functionality to deal with the hashes without the sha256: prefix. A new method, fromDigestOrgHash has beend added to DescriptorDigest which first checks for the digest prefix and then checks for the hash. This allows full backwards compatibility and accepts the Podman version of the image Ids.

Fixes #4134 🛠️

mihalyr avatar Aug 22 '24 03:08 mihalyr