From cb8a8b3176885d2ac215ec77aa8afd7b4cb32489 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 23 Dec 2020 21:31:14 +0900 Subject: [PATCH] media-types.md: clarify differences from Docker media types OCI media types are slightly different from Docker ones, e.g., Docker manifests must have `.mediaType` field while OCI may not have. Also, OCI descriptors may have `.annotations` while Docker may not. Also updates to compare the spec with Docker Image Spec v1.2, not v1.0. OCI Image Spec v1 is more akin to Docker Image Spec v1.2 rather than v1.0, which lacked content addressability. See also https://github.com/moby/moby/blob/v20.10.1/image/spec/README.md for differencces between Docker Image Spec v1.2 and v1.0. Signed-off-by: Akihiro Suda --- media-types.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/media-types.md b/media-types.md index b9a08246c..d7db6ab67 100644 --- a/media-types.md +++ b/media-types.md @@ -38,25 +38,40 @@ This section shows where the OCI Image Specification is compatible with formats **Similar/related schema** -- [application/vnd.docker.distribution.manifest.list.v2+json](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) - mediaType is different +- [application/vnd.docker.distribution.manifest.list.v2+json](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) + - `.mediaType`: only present in Docker + - `.annotations`: only present in OCI + - `.[]manifests.annotations`: only present in OCI + - `.[]manifests.urls`: only present in OCI ### application/vnd.oci.image.manifest.v1+json **Similar/related schema** - [application/vnd.docker.distribution.manifest.v2+json](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#image-manifest-field-descriptions) + - `.mediaType`: only present in Docker + - `.annotations`: only present in OCI + - `.config.annotations`: only present in OCI + - `.config.urls`: only present in OCI + - `.[]layers.annotations`: only present in OCI ### application/vnd.oci.image.layer.v1.tar+gzip **Interchangeable and fully compatible mime-types** -- [application/vnd.docker.image.rootfs.diff.tar.gzip](https://github.com/docker/docker/blob/master/image/spec/v1.md#creating-an-image-filesystem-changeset) +- [application/vnd.docker.image.rootfs.diff.tar.gzip](https://github.com/moby/moby/blob/v20.10.1/image/spec/v1.2.md#creating-an-image-filesystem-changeset) ### application/vnd.oci.image.config.v1+json **Similar/related schema** -- [application/vnd.docker.container.image.v1+json](https://github.com/docker/docker/blob/master/image/spec/v1.md#image-json-description) +- [application/vnd.docker.container.image.v1+json](https://github.com/moby/moby/blob/v20.10.1/image/spec/v1.2.md#image-json-description) (Docker Image Spec v1.2) + - `.config.Memory`: only present in Docker + - `.config.MemorySwap`: only present in Docker + - `.config.CpuShares`: only present in Docker + - `.config.Healthcheck`: only present in Docker + - `.config.Labels`: only present in OCI + - `.config.StopSignal`: only present in OCI ## Relations