mkctr
mkctr copied to clipboard
A base image with media type `application/vnd.docker.distribution.manifest.v2+json` and single image breaks
It seems a base image that has been built for a single architecture and has media type application/vnd.docker.distribution.manifest.v2+json does not work as a base image for mkctr.
For example with base image alpine@sha256:13b7e62e8df80264dbb747995705a986aa530415763a6c58f84a3ca8af9a5bcd it will fail with:
2023/12/11 07:40:16 unknown platform for image: alpine@sha256:13b7e62e8df80264dbb747995705a986aa530415763a6c58f84a3ca8af9a5bcd
exit status 1
A workaround for this, if you want to use a base image that is just for a single arch is to ensure that the image media type is application/vnd.oci.image.index.v1+json (so don't pass --load or --output=type=docker flags if building base with docker). This is probably to do with differences in manifest structure, not with the actual type.
You can check the manifest by running gcrane manifest <image>