Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Podman image inspect digest for local images
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.
- Loading branch information