You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
manifest, specs-go/: provide guidance on SCRATCH config descriptor
Ref: #1025
Through the conversations between artifact manifest and standardizing
the misuse of the image-manifest one of the topics was around when there
is _not_ a `config` needed for the `layers`/blobs.
Since the `config` is a REQUIRED field, it meant setting this to some
valid value.
This guidance intends to set a norm for a blob that need only be pushed
to a registry a single time, and then save on round trips for all future
SCRATCH configs, while also being most widely portability.
to facilitate use by tools that import this reference code to identify
this specific blob when working with an empty/scratch config blob and
layer blob. This will utilize the same blob for both
Signed-off-by: Vincent Batts <[email protected]>
Copy file name to clipboardExpand all lines: manifest.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,12 @@ Unlike the [image index](image-index.md), which contains information about a set
42
42
43
43
If the manifest uses a different media type than the above, it MUST comply with [RFC 6838][rfc6838], including the [naming requirements in its section 4.2][rfc6838-s4.2], and MAY be registered with [IANA][iana].
44
44
45
+
To set an effectively NULL or SCRATCH config and maintain portability the following is considered GUIDANCE.
46
+
While an empty blob (`size` of 0) may be preferable, practice has shown that not to be ubiquitiously supported.
47
+
Instead, the blob payload can be the most minimal content that is still valid JSON object: `{}` (`size` of 2).
48
+
The blob digest of `{}` is `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`.
49
+
See the [example SCRATCH config](#example-of-a-scratch-config-or-layer-descriptor) below, and the `ScratchDescriptor()` of the reference code.
50
+
45
51
-**`layers`***array of objects*
46
52
47
53
Each item in the array MUST be a [descriptor](descriptor.md).
@@ -50,6 +56,9 @@ Unlike the [image index](image-index.md), which contains information about a set
50
56
The final filesystem layout MUST match the result of [applying](layer.md#applying-changesets) the layers to an empty directory.
51
57
The [ownership, mode, and other attributes](layer.md#file-attributes) of the initial empty directory are unspecified.
52
58
59
+
For broad portability, if a layer is required to be used, use the SCRATCH layer.
60
+
See the [example SCRATCH layer](#example-of-a-scratch-config-or-layer-descriptor) below, and the `ScratchDescriptor()` of the reference code.
61
+
53
62
Beyond the [descriptor requirements](descriptor.md#properties), the value has the following additional restrictions:
54
63
55
64
-**`mediaType`***string*
@@ -122,6 +131,18 @@ Unlike the [image index](image-index.md), which contains information about a set
122
131
}
123
132
```
124
133
134
+
## Example of a SCRATCH config or layer descriptor
135
+
136
+
Notice that the `mediaType` is subject to the usage or context, while the digest is specifically defined as `ScratchDigestSHA256`
0 commit comments