Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Container-diff cannot download images with OCI manifest #389

@BronzeDeer

Description

@BronzeDeer

I ran into this bug when trying to fix the integration tests for kaniko which relies on container-diff to verify build parity between kaniko and docker
One of the test images is based on ubuntu:rolling, which by now is serving OCI indexes and manifests.

Expected behavior

container-diff can pull and then analyze or diff the images

Actual behavior

ERRO[0001] error retrieving image ubuntu@sha256:699796ebf58f6d43889a7a2a29bcc8e421f8fa86bdc00d3ffededdb37e2a8d4c: MANIFEST_UNKNOWN: OCI index found, but accept header does not support OCI indexes

Information

  • container-diff version: version: v0.17.0 built from git bea7ad9

Steps to reproduce the behavior

container-diff analyze ubuntu@sha256:699796ebf58f6d43889a7a2a29bcc8e421f8fa86bdc00d3ffededdb37e2a8d4c

Notes

On noticing that the go-containerregistry dependency in go.mod is over 4 years old, I bumped it to the newest release (v0.13.0) and if I build with this dependency, the resulting container-diff works

$ ./container-diff-local version
      v0.17.0 built from git (unknown)
$ ./container-diff-local analyze ubuntu@sha256:699796ebf58f6d43889a7a2a29bcc8e421f8fa86bdc00d3ffededdb37e2a8d4c

-----Size-----

Analysis for ubuntu@sha256:699796ebf58f6d43889a7a2a29bcc8e421f8fa86bdc00d3ffededdb37e2a8d4c:
IMAGE                                                                                 DIGEST                                                                         SIZE
ubuntu@sha256:699796ebf58f6d43889a7a2a29bcc8e421f8fa86bdc00d3ffededdb37e2a8d4c        sha256:3314ba73393b9a02c8e86e2222d58dcba1a3b8a996f1dae66c59504a4c8be3cd        70.6M

I'll be putting up a PR shortly, however I'm a bit worried that such a large jump in dependency version might be disruptive, so I am open to suggestions for an older version of ggcr or any things that need to be fixed when bumping to version 1.17 dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions