Rename the scratch variable and layer requirements#1042
Rename the scratch variable and layer requirements#1042sajayantony merged 1 commit intoopencontainers:mainfrom
Conversation
ee5c804 to
291256e
Compare
291256e to
c73725d
Compare
|
I've updated with the requested changes. |
c73725d to
e2b98f7
Compare
| Subsequent layers MUST then follow 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-changesets) the layers to an empty directory. | ||
| The [ownership, mode, and other attributes](layer.md#file-attributes) of the initial empty directory are unspecified. | ||
| For portability, `layers` SHOULD have at least one entry. |
There was a problem hiding this comment.
If we're embracing the scratch blob to support scenarios that don't require a config, can we also use scratch to represent a layer for scenarios where users are adding annotations as a reference type?
There was a problem hiding this comment.
Yes, that was part of the intent of the scratch descriptor.
|
Linking the previos comment since we might want to come back to a struct - #1023 (comment) |
|
Assuming we have a static media type for scratch (https://github.com/opencontainers/image-spec/pull/1043/files#diff-787b938deb273ebe89950c4ff04dbcb072c4644e729ad4fb495265e24bcbfce4), I'd also like to move this to a single Descriptor we expose. |
specs-go/v1/manifest.go
Outdated
| const ScratchDigestData = `{}` | ||
| const ( | ||
| // ScratchDigestSHA256 is the digest of a blob with content of `{}` (size of 2). | ||
| ScratchDigestSHA256 = `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a` |
There was a problem hiding this comment.
IMO, if we keep this field, we should drop SHA256 from the end of it too, but as discussed in the call today, now that we have an explicit media type for scratch from #1043, we can probably revisit #1023 (comment) and have a proper Descriptor object again (and not really need a function for it).
Signed-off-by: Brandon Mitchell <git@bmitch.net>
e2b98f7 to
fd45b6b
Compare
|
This has been updated with the changes from today's meeting. PTAL. |
This covers a few nits with the scratch variable and documentation on its usage. It also clarifies that various requirements on the layer blobs only apply when the config media type specifies the content is an OCI Image (vs using the image manifest to package an artifact).