Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest: Explicitly make 'layers' optional #407

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ 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.

Beyond the [descriptor requirements](descriptor.md#properties), the value has the following additional restrictions:
Expand Down
3 changes: 1 addition & 2 deletions schema/image-manifest-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"required": [
"schemaVersion",
"mediaType",
"config",
"layers"
"config"
]
}
2 changes: 1 addition & 1 deletion specs-go/v1/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down