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
spec: Standardize language for actions ((un)packing, etc.)
To set ourselves up for more consistent discussions. This also
unifies the old "Overview" and "Understanding the Specification"
sections, which had a fair amount of overlap.
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: layer.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ END FOR
91
91
92
92
With this approach, the link map and links names of a directory could be compared against that of another directory to derive additions and changes to hardlinks.
93
93
94
-
## Creating
94
+
## Packing
95
95
96
96
### Initial Root Filesystem
97
97
@@ -211,17 +211,17 @@ The resulting tar archive for `rootfs-c9d-v1.s1` has the following entries:
211
211
212
212
To signify that the resource `./etc/my-app-config` MUST be removed when the changeset is applied, the basename of the entry is prefixed with `.wh.`.
213
213
214
-
## Applying Changesets
214
+
## Unpacking
215
215
216
-
Layer Changesets of [media type](media-types.md)`application/vnd.oci.image.layer.v1.tar` are _applied_, rather than simply extracted as tar archives.
216
+
Layer Changesets of [media type](media-types.md)`application/vnd.oci.image.layer.v1.tar` are _unpacked_, rather than simply extracted as tar archives.
217
217
218
-
Applying a layer changeset requires special consideration for the [whiteout](#whiteouts) files.
218
+
Unpacking a layer changeset requires special consideration for the [whiteout](#whiteouts) files.
219
219
220
220
In the absence of any [whiteout](#whiteouts) files in a layer changeset, the archive is extracted like a regular tar archive.
221
221
222
222
### Changeset over existing files
223
223
224
-
This section specifies applying an entry from a layer changeset if the target path already exists.
224
+
This section specifies unpacking an entry from a layer changeset if the target path already exists.
225
225
226
226
If the entry and the existing path are both directories, then the existing path's attributes MUST be replaced by those of the entry in the changeset.
227
227
In all other cases, the implementation MUST do the semantic equivalent of the following:
-[Understanding the Specification](#understanding-the-specification)
13
-
-[Media Types](media-types.md)
12
+
-[Components](#componets)
13
+
-[Actions](#actions)
14
+
-[Publishing Images](#publishing-images)
15
+
-[Consuming Images](#consuming-images)
16
+
-[Media Types](#media-types.md)
14
17
-[Content Descriptors](descriptor.md)
15
18
-[Image Layout](image-layout.md)
16
19
-[Image Manifest](manifest.md)
@@ -33,18 +36,7 @@ An implementation is compliant if it satisfies all the MUST, REQUIRED, and SHALL
33
36
34
37
# Overview
35
38
36
-
At a high level the image manifest contains metadata about the contents and dependencies of the image including the content-addressable identity of one or more [filesystem layer changeset](layer.md) archives that will be unpacked to make up the final runnable filesystem.
37
-
The image configuration includes information such as application arguments, environments, etc.
38
-
The manifest list is a higher-level manifest which points to one or more manifests.
39
-
Typically, these manifests may provide different implementations of the image, possibly varying by platform or other attributes.
40
-
41
-

42
-
43
-
Once built the OCI Image can then be discovered by name, downloaded, verified by hash, trusted through a signature, and unpacked into an [OCI Runtime Bundle](https://github.com/opencontainers/runtime-spec/blob/master/bundle.md).
44
-
45
-

46
-
47
-
## Understanding the Specification
39
+
## Components
48
40
49
41
The [OCI Image Media Types](media-types.md) document is a starting point to understanding the overall structure of the specification.
50
42
@@ -56,4 +48,42 @@ The high-level components of the spec include:
56
48
* Signatures that are based on signing image content address (optional OCI layer)
57
49
* Naming that is federated based on DNS and can be delegated (optional OCI layer)
58
50
51
+
## Actions
52
+
53
+
The specified [components](#components) MAY be manipulated with actions.
54
+
55
+
***pack**: Create a blob from the local filesystem (or other storage).
56
+
***unpack**: Update the local filesystem (or other storage) based on data found in a blob.
57
+
***validate**: Verify that blobs [comply](#notational-conventions) with the specification for their [media type](media-types.md).
58
+
Blobs can be validated on their own (**intra-blob validation**) or recursively including [referenced](descriptor.md) ancestors (**recursive validation**).
59
+
***translate**: Convert a blob between similar formats.
60
+
Translation may be **lossy** or **lossless** depending on how well the formats align.
61
+
62
+
## Publishing Images
63
+
64
+
In publishing a new image, an example workflow is:
65
+
66
+
* The [bundle][]'s [root filesystem][runtime-spec-root] is packed into a [layer](layer.md) (or layers).
67
+
* The [bundle's `config.json`][bundle] is translated into an [image configuration](config.md).
68
+
* The image configuration and layer(s) are packed into a [manifest](manifest.md).
69
+
* That manifest (and potentially other manifests) are packed into a [manifest-list](manifest-list.md) (optional).
70
+
* A reference to the manifest-list (and/or manifest) is published.
71
+
72
+

73
+
74
+
## Consuming Images
75
+
76
+
In consuming an existing image, an example workflow is:
77
+
78
+
* The image reference is discovered (possibly via an [index of references](image-layout.md#refs) and [associated annotations](descriptor.md#properties).
79
+
* The referenced [manifest-list](manifest-list.md) (optional) is unpacked to find the appropriate [manifest](manifest.md) for the target platform.
80
+
* The referenced [manifest](manifest.md) is unpacked to find the [image configuration](config.md) and [layer(s)](layer.md).
81
+
* The referenced [layer(s)](layer.md) are unpacked into the [bundle][]'s [root filesystem][runtime-spec-root].
82
+
* The referenced [image configuration](config.md) is translated to a [runtime configuration][runtime-spec-config] and written to the [bundle's `config.json`][bundle].
0 commit comments