diff --git a/media-types.md b/media-types.md index d426814da..c1bd41741 100644 --- a/media-types.md +++ b/media-types.md @@ -38,6 +38,13 @@ This section shows where the OCI Image Specification is compatible with formats - [application/vnd.docker.container.image.v1+json](https://github.com/docker/docker/blob/master/image/spec/v1.md#image-json-description) + Differences compared to the OCI schema: + + * Docker's [v1.1](https://github.com/docker/docker/blob/master/image/spec/v1.1.md#container-runconfig-field-descriptions) and [v1.2](https://github.com/docker/docker/blob/master/image/spec/v1.2.md#container-runconfig-field-descriptions) declare a [`rootfs.type`] property but only document a `layers` argument. + The OCI configuration does not provide a `rootfs.type` property, and treats all configurations as if they used Docker's `layers` value. + Translators converting Docker v1.1 or v1.2 configurations to OCI configurations should error out if `rootfs.type` contains any string other than `layers`. + Translators converting OCI configurations to Docker v1.1 or v1.2 configurations should always set `rootfs.type` to `layers`. + ## Relations The following figure shows how the above media types reference each other: diff --git a/schema/config_test.go b/schema/config_test.go index 27c14875c..76cbbd816 100644 --- a/schema/config_test.go +++ b/schema/config_test.go @@ -136,8 +136,7 @@ func TestConfig(t *testing.T) { "diff_ids": [ "sha256:9d3dd9504c685a304985025df4ed0283e47ac9ffa9bd0326fddf4d59513f0827", "sha256:2b689805fbd00b2db1df73fae47562faac1a626d5f61744bfe29946ecff5d73d" - ], - "type": "layers" + ] }, "history": [ { diff --git a/schema/defs-config.json b/schema/defs-config.json index 47ad2c6c0..18ae31cce 100644 --- a/schema/defs-config.json +++ b/schema/defs-config.json @@ -74,9 +74,6 @@ "items": { "type": "string" } - }, - "layers": { - "type": "string" } } }, diff --git a/serialization.md b/serialization.md index 8229bf614..c0118f74f 100644 --- a/serialization.md +++ b/serialization.md @@ -302,12 +302,9 @@ Note: whitespace has been added to this example for clarity. Whitespace is OPTIO
The rootfs key references the layer content addresses used by the image. This makes the image config hash depend on the filesystem hash. - rootfs has two subkeys: + Subkeys:
diff --git a/specs-go/v1/config.go b/specs-go/v1/config.go index 1a6770748..85d925461 100644 --- a/specs-go/v1/config.go +++ b/specs-go/v1/config.go @@ -49,9 +49,6 @@ type ImageConfig struct { // RootFS describes a layer content addresses type RootFS struct { - // Type is the type of the rootfs. - Type string `json:"type"` - // DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most. DiffIDs []string `json:"diff_ids"` }