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
Copy file name to clipboardExpand all lines: image-layout.md
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ Given an image layout and a ref, a tool can create an [OCI Runtime Specification
9
9
*[Applying the filesystem layers](layer.md#applying) in the specified order
10
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)
11
11
12
+
# Content
13
+
12
14
The image layout MUST contain two top level directories:
13
15
14
16
-`blobs` contains content-addressable blobs.
@@ -25,6 +27,8 @@ The image layout MUST also contain an `oci-layout` file:
25
27
- The `imageLayoutVersion` value will align with the OCI Image Specification version at the time changes to the layout are made, and will pin a given version until changes to the layout are required
26
28
- It MAY include additional fields
27
29
30
+
## Example Layout
31
+
28
32
This is an example image layout:
29
33
30
34
```
@@ -49,16 +53,9 @@ $ shasum -a 256 ./blobs/sha256/afff3924849e458c5ef237db5f89539274d5e609db5db935e
Object names in the `refs` subdirectories MUST NOT include characters outside of the set of "A" to "Z", "a" to "z", "0" to "9", the hyphen `-`, the dot `.`, and the underscore `_`.
56
+
## Refs
53
57
54
-
Object names in the `blobs` subdirectories are composed of a directory for each hash algorithm, the children of which will contain the actual content.
55
-
A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<hex>`.
56
-
The character set of the entry name for `<hex>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification).
57
-
For example `sha256:5b` will map to the layout `blobs/sha256/5b`.
58
-
59
-
The blobs directory MAY contain blobs which are not referenced by any of the refs.
60
-
61
-
The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store.
58
+
Object names in the `refs` subdirectories MUST NOT include characters outside of the set of "A" to "Z", "a" to "z", "0" to "9", the hyphen `-`, the dot `.`, and the underscore `_`.
62
59
63
60
No semantic restriction is given for object names in the `refs` subdirectory.
64
61
Each object in the `refs` subdirectory MUST be of type `application/vnd.oci.descriptor.v1+json`.
@@ -70,7 +67,7 @@ For example, an image may have a tag for different versions or builds of the sof
70
67
In the wild you often see "tags" like "v1.0.0-vendor.0", "2.0.0-debug", etc.
71
68
Those tags will often be represented in an image-layout repository with matching refs names like "v1.0.0-vendor.0", "2.0.0-debug", etc.
72
69
73
-
This illustrates the expected contents of a given ref, the manifest list it points to and the blobs the manifest references.
70
+
### Example Ref
74
71
75
72
```
76
73
$ cat ./refs/v1.0 | jq
@@ -81,6 +78,21 @@ $ cat ./refs/v1.0 | jq
81
78
}
82
79
```
83
80
81
+
This illustrates the expected contents of a given ref, the manifest list it points to and the blobs the manifest references.
82
+
83
+
## Blobs
84
+
85
+
Object names in the `blobs` subdirectories are composed of a directory for each hash algorithm, the children of which will contain the actual content.
86
+
A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<hex>`.
87
+
The character set of the entry name for `<hex>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification).
88
+
For example `sha256:5b` will map to the layout `blobs/sha256/5b`.
89
+
90
+
The blobs directory MAY contain blobs which are not referenced by any of the refs.
91
+
92
+
The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store.
0 commit comments