diff --git a/manifest.md b/manifest.md index 71fc35bb8..810f4515c 100644 --- a/manifest.md +++ b/manifest.md @@ -41,10 +41,11 @@ Unlike the [Manifest List](manifest-list.md), which contains information about a - **`layers`** *array* + This OPTIONAL property references the [layers](layer.md) defining the container's root filesystem. Each item in the array MUST be a [descriptor](descriptor.md). - The array MUST have the base image at index 0. - Subsequent layers MUST then follow in stack order (i.e. from `layers[0]` to `layers[len(layers)-1]`). + Layers MUST be [applied](layer.md#applying) in stack order (i.e. from `layers[0]` to `layers[len(layers)-1]`). The final filesystem layout MUST match the result of [applying](layer.md#applying) the layers to an empty directory. + The [ownership, mode, and other attributes](layer.md#file-attributes) of the initial empty directory are unspecified. Beyond the [descriptor requirements](descriptor.md#properties), the value has the following additional restrictions: diff --git a/schema/image-manifest-schema.json b/schema/image-manifest-schema.json index f25c85fd2..a5e09c518 100644 --- a/schema/image-manifest-schema.json +++ b/schema/image-manifest-schema.json @@ -30,7 +30,6 @@ "required": [ "schemaVersion", "mediaType", - "config", - "layers" + "config" ] } diff --git a/specs-go/v1/manifest.go b/specs-go/v1/manifest.go index d8b06306c..5adea783a 100644 --- a/specs-go/v1/manifest.go +++ b/specs-go/v1/manifest.go @@ -25,7 +25,7 @@ type Manifest struct { Config Descriptor `json:"config"` // Layers is an indexed list of layers referenced by the manifest. - Layers []Descriptor `json:"layers"` + Layers []Descriptor `json:"layers,omitempty"` // Annotations contains arbitrary metadata for the manifest list. Annotations map[string]string `json:"annotations"`