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

An image may have empty layers array #313

Closed
Closed
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
2 changes: 1 addition & 1 deletion manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s

- **`layers`** *array*

Each item in the array MUST be a [descriptor](descriptor.md).
This property MAY be empty, an image can have an empty layers array. Each item in the array MUST be a [descriptor](descriptor.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be “This OPTIONAL property”. And we should stick to the one sentence per line rule.

To make this change clear, I think we also want the validation fix in #308, omitempty in the Go property, and dropping layers from required in schema/image-manifest-schema.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mangle this line. The fact that these are descriptors is way more important than whether or not it can be empty.

The array MUST have the base image at index 0.
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines should be restructured to avoid requiring a zero-index layer. Something like:

The root filesystem MUST match an empty directory onto which the layers have been [applied](layer.md#applying) in the listed order.

With “match” instead of “be” to allow folks to apply via a union filesystem or whatever. As long as the finished product is right.

The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on.
Expand Down