Skip to content

Commit d6093c8

Browse files
authored
Merge pull request #136 from runcom/fixes
image-layout: clarification
2 parents 59f9518 + ca809b3 commit d6093c8

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

image-layout.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ find .
2626
./oci-layout
2727
./refs
2828
./refs/v1.0
29-
./refs/v1.1
29+
./refs/stable-release
3030
```
3131

3232
Blobs are named by their contents:
@@ -36,27 +36,46 @@ $ shasum -a 256 ./blobs/sha256-afff3924849e458c5ef237db5f89539274d5e609db5db935e
3636
afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 ./blobs/sha256-afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51
3737
```
3838

39-
Object names in the refs and blobs MUST NOT include characters outside of the set of "A" to "Z", "a" to "z", the hyphen `-`, the dot `.`, and the underscore `_`.
39+
Object names in the `refs` and `blobs` MUST NOT include characters outside of the set of "A" to "Z", "a" to "z", the hyphen `-`, the dot `.`, and the underscore `_`.
4040
Hash algorithm identifiers containing the colon `:` will be converted to the hyphen `-`.
4141
For example `sha256:5b` will map to the layout `blobs/sha256-5b`.
4242
The blobs directory MAY contain blobs which are not referenced by any of the refs.
4343
The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store.
4444

45-
Each object in the refs subdirectory MUST be of type `application/vnd.oci.descriptor.v1+json`.
45+
No semantic restriction is given for object names in the `refs` subdirectory.
46+
Each object in the `refs` subdirectory MUST be of type `application/vnd.oci.descriptor.v1+json`.
4647
In general the `mediatype` of this descriptor object will be either `application/vnd.oci.image.manifest.list.v1+json` or `application/vnd.oci.image.manifest.v1+json` although future versions of the spec MAY use a different mediatype.
4748

48-
This illustrates the expected contents of a given ref and the manifest list it points to.
49+
This illustrates the expected contents of a given ref, the manifest list it points to and the blobs the manifest references.
4950

5051
```
5152
$ cat ./refs/v1.0
52-
{"size": 4096, "digest": "sha256:afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51", "mediatype": "application/vnd.oci.image.manifest.list.v1+json"}
53+
{"size": 4096, "digest": "sha256:afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51", "mediatype": "application/vnd.oci.image.manifest.v1+json"}
5354
```
5455
```
5556
$ cat ./blobs/sha256-afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51
5657
{
5758
"schemaVersion": 2,
58-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
59-
"manifests": [
59+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
60+
"config": [
61+
"mediaType": "application/vnd.oci.image.serialization.config.v1+json",
62+
"size": 7023,
63+
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
64+
},
65+
"layers": [
6066
{
67+
"mediaType": "application/vnd.oci.image.serialization.rootfs.tar.gzip",
68+
"size": 32654,
69+
"digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f"
70+
},
6171
...
6272
```
73+
```
74+
$ cat ./blobs/sha256-5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270
75+
{"architecture":"amd64","author":"Antonio Murdaca \[email protected]\u003e","config":{"Hostname":"8dfe43d80430","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":null,"Image":"sha256:6986ae504bbf843512d680cc959484452034965db15f75ee8bdd1b107f61500b",
76+
...
77+
```
78+
```
79+
$ cat ./blobs/sha256-e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f
80+
[tar stream]
81+
```

0 commit comments

Comments
 (0)