Skip to content

Commit 729c805

Browse files
committed
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]>
1 parent ed18de1 commit 729c805

File tree

2 files changed

+49
-19
lines changed

2 files changed

+49
-19
lines changed

layer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ END FOR
9191

9292
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.
9393

94-
## Creating
94+
## Packing
9595

9696
### Initial Root Filesystem
9797

@@ -211,17 +211,17 @@ The resulting tar archive for `rootfs-c9d-v1.s1` has the following entries:
211211

212212
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.`.
213213

214-
## Applying Changesets
214+
## Unpacking
215215

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.
217217

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.
219219

220220
In the absence of any [whiteout](#whiteouts) files in a layer changeset, the archive is extracted like a regular tar archive.
221221

222222
### Changeset over existing files
223223

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.
225225

226226
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.
227227
In all other cases, the implementation MUST do the semantic equivalent of the following:

spec.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ The goal of this specification is to enable the creation of interoperable tools
99
- [Introduction](spec.md)
1010
- [Notational Conventions](#notational-conventions)
1111
- [Overview](#overview)
12-
- [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)
1417
- [Content Descriptors](descriptor.md)
1518
- [Image Layout](image-layout.md)
1619
- [Image Manifest](manifest.md)
@@ -33,18 +36,7 @@ An implementation is compliant if it satisfies all the MUST, REQUIRED, and SHALL
3336

3437
# Overview
3538

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-
![](img/build-diagram.png)
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-
![](img/run-diagram.png)
46-
47-
## Understanding the Specification
39+
## Components
4840

4941
The [OCI Image Media Types](media-types.md) document is a starting point to understanding the overall structure of the specification.
5042

@@ -56,4 +48,42 @@ The high-level components of the spec include:
5648
* Signatures that are based on signing image content address (optional OCI layer)
5749
* Naming that is federated based on DNS and can be delegated (optional OCI layer)
5850

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+
![](img/build-diagram.png)
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].
83+
84+
![](img/run-diagram.png)
85+
5986
[c99-unspecified]: http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf#page=18
87+
[bundle]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md
88+
[runtime-spec-root]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md#root-configuration
89+
[runtime-spec-config]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md

0 commit comments

Comments
 (0)