Skip to content

Commit 261ed42

Browse files
authored
Merge pull request #349 from vbatts/layer_ordering
Clarify layer ordering
2 parents b817704 + 52f5d46 commit 261ed42

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ Since the [configuration JSON](#image-json) that gets hashed references hashes o
141141

142142
- **diff_ids** *array*, REQUIRED
143143

144-
An array of layer content hashes (`DiffIDs`), in order from bottom-most to top-most.
144+
An array of layer content hashes (`DiffIDs`), in order from first to last.
145145

146146
- **history** *array of objects*, OPTIONAL
147147

148148
Describes the history of each layer.
149-
The array is ordered from bottom-most layer to top-most layer.
149+
The array is ordered from first to last.
150150
The object has the following fields:
151151

152152
- **created** *string*, OPTIONAL

image-layout.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
The OCI Image Layout is a slash separated layout of OCI content-addressable blobs and [location-addressable](https://en.wikipedia.org/wiki/Content-addressable_storage#Content-addressed_vs._location-addressed) references (refs).
44
This layout MAY be used in a variety of different transport mechanisms: archive formats (e.g. tar, zip), shared filesystem environments (e.g. nfs), or networked file fetching (e.g. http, ftp, rsync).
5-
Given an image layout a tool can convert a given ref into a runnable OCI Image Format by finding an appropriate manifest from the manifest list, unpacking the [filesystem layers](layer.md) in the correct order, and then converting the image configuration into an OCI Runtime config.json.
5+
6+
Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md) by:
7+
8+
* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list)
9+
* Applying the filesystem layers in the specified order
10+
* Converting the [image configuration](config.md) into an [OCI Runtime Specification config.json](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md)
611

712
The image layout has two top level directories:
813

layer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Image Layer Filesystem Changeset
22

33
This document describes how to serialize a filesystem and filesystem changes like removed files into a blob called a layer.
4-
One or more layers are ordered on top of each other to create a complete filesystem.
4+
One or more layers are applied on top of each other to create a complete filesystem.
55
This document will use a concrete example to illustrate how to create and consume these filesystem layers.
66

77
## Distributable Format

manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s
159159

160160
Each item in the array MUST be a [descriptor](descriptor.md).
161161
The array MUST have the base image at index 0.
162-
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
163-
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.
162+
Subsequent layers MUST then follow in stack order (i.e. from `layers[0]` to `layers[len(layers)]`).
163+
The final filesystem layout MUST match the result of [applying](layer.md#applying) the layers to an empty directory.
164164

165165
Beyond the [descriptor requirements](descriptor.md#properties), the value has the following additional restrictions:
166166

0 commit comments

Comments
 (0)