google / go-containerregistry

Go library and CLIs for working with container registries
Apache License 2.0
3.12k stars 542 forks source link

ggcr: creating an empty image index that contains empty image manifest not supported #1904

Closed codingben closed 3 months ago

codingben commented 7 months ago

Describe the bug

We're using google/go-containerregistry in our tooling to create container images [1].

[1] https://github.com/kubevirt/containerdisks

Our steps:

  1. Create a new image manifest from empty image base that has DockerManifestSchema [1].
  2. Create a new image index from empty image index base that has OCIImageIndex [2].

When trying to copy it from internal registry to Quay container registry, it fails with an error that it's not supported.

[1] https://github.com/google/go-containerregistry/blob/main/pkg/v1/empty/image.go#L32 [2] https://github.com/google/go-containerregistry/blob/main/pkg/v1/empty/index.go#L32

To Reproduce

Just create an empty image index with empty image inside and try to copy it from internal registry to external container registry.

Expected behavior

Empty image manifest and empty image index should have the same media type. Ideally only and just OCI and not Docker.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Keep fresh with the 'lifecycle/frozen' label.