Skip to content

crane: mutate and append adds layer with docker mediaType regardless of what base image uses  #1427

@thesayyn

Description

@thesayyn

Describe the bug

mutate or append adds new layers as DockerLayer instead of OCILayer when the base image only has OCI mediaTypes.
This behavior leads to mixed mediaTypes.

To Reproduce

crane mutate thesayyn/debian:oci --append <some>.tar. <your-registry>:oci-mixed

Expected behavior

The newly added layer should have the mediaType application/vnd.oci.image.layer.v1.tar+gzip instead of application/vnd.docker.image.rootfs.diff.tar.gzip. Perhaps this could be controlled by a global flag? Maybe --preferred-media-types=oci|docker?

Additional context

Add any other context about the problem here.

  • Output of crane version: 0.11.0
  • Registry used (e.g., GCR, ECR, Quay): Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions