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
- use correct indentation for sub lists
- address some missing OPTIONAL tags
- random formatting issues.
Thanks @coolljt0725 and @wking for the review.
Copy file name to clipboardExpand all lines: config.md
+37-36Lines changed: 37 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Changing it means creating a new derived image, instead of changing the existing
26
26
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., `sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9`.
27
27
Layers must be packed and unpacked reproducibly to avoid changing the layer DiffID, for example by using tar-split to save the tar headers.
28
28
29
-
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types.
29
+
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for `application/vnd.oci.image.layer.tar+gzip` types.
30
30
31
31
### Layer ChainID
32
32
@@ -35,20 +35,20 @@ This is called a `ChainID`.
35
35
For a single layer (or the layer at the bottom of a stack), the
36
36
`ChainID` is equal to the layer's `DiffID`.
37
37
38
-
Otherwise the <code>ChainID</code> is given by the formula:
Each image's ID is given by the SHA256 hash of its configuration JSON.
44
-
It is represented as a hexadecimal encoding of 256 bits, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>.
44
+
It is represented as a hexadecimal encoding of 256 bits, e.g., `sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9`.
45
45
Since the configuration JSON that gets hashed references hashes of each layer in the image, this formulation of the ImageID makes images content-addresable.
46
46
47
47
## Properties
48
48
49
49
-**created***string*, OPTIONAL
50
50
51
-
A ISO-8601 formatted combined date and time at which the image was created.
51
+
An ISO-8601 formatted combined date and time at which the image was created.
52
52
53
53
-**author***string*, OPTIONAL
54
54
@@ -71,13 +71,13 @@ Since the configuration JSON that gets hashed references hashes of each layer in
71
71
-**config***object*, OPTIONAL
72
72
73
73
The execution parameters which should be used as a base when running a container using the image.
74
-
This field can be <code>null</code>, in which case any execution parameters should be specified at creation of the container.
74
+
This field can be `null`, in which case any execution parameters should be specified at creation of the container.
75
75
76
-
-**user***string*, OPTIONAL
76
+
-**User***string*, OPTIONAL
77
77
78
78
The username or UID which the process in the container should run as.
79
79
This acts as a default value to use when the value is not specified when creating a container.
80
-
All of the following are valid: `user`, `uid`, `user:group`, `uid:gid`, `uid:group`, `uiser:gid`
80
+
All of the following are valid: `user`, `uid`, `user:group`, `uid:gid`, `uid:group`, `user:gid`
81
81
If `group`/`gid` is not specified, the default group and supplementary groups of the given `user`/`uid` in `/etc/passwd` from the container are applied.
82
82
83
83
-**Memory***integer*, OPTIONAL
@@ -87,7 +87,7 @@ Since the configuration JSON that gets hashed references hashes of each layer in
87
87
88
88
-**MemorySwap***integer*, OPTIONAL
89
89
90
-
Total memory usage (memory + swap); set to <code>-1</code> to disable swap.
90
+
Total memory usage (memory + swap); set to `-1` to disable swap.
91
91
This acts as a default value to use when the value is not specified when creating a container.
92
92
93
93
-**CpuShares***integer*, OPTIONAL
@@ -101,17 +101,17 @@ Since the configuration JSON that gets hashed references hashes of each layer in
101
101
Its keys can be in the format of:
102
102
`port/tcp`, `port/udp`, `port` with the default protocol being `tcp` if not specified.
103
103
These values act as defaults and are merged with any specified when creating a container.
104
-
**NOTE:** This JSON structure value is unusual because it is a direct JSON serialization of the Go type <code>map[string]struct{}</code> and is represented in JSON as an object mapping its keys to an empty object.
104
+
**NOTE:** This JSON structure value is unusual because it is a direct JSON serialization of the Go type `map[string]struct{}` and is represented in JSON as an object mapping its keys to an empty object.
105
105
106
106
-**Env***array of strings*, OPTIONAL
107
107
108
-
Entries are in the format of <code>VARNAME="var value"</code>.
108
+
Entries are in the format of `VARNAME="var value"`.
109
109
These values act as defaults and are merged with any specified when creating a container.
110
110
111
-
-**Entrypoint***array of strings*
111
+
-**Entrypoint***array of strings*, OPTIONAL
112
112
113
113
A list of arguments to use as the command to execute when the container starts.
114
-
This value acts as a default and is replaced by an entrypoint specified when creating a container. This field MAY be "null".
114
+
This value acts as a default and is replaced by an entrypoint specified when creating a container. This field MAY be null.
115
115
116
116
-**Cmd***array of strings*, OPTIONAL
117
117
@@ -120,10 +120,11 @@ Since the configuration JSON that gets hashed references hashes of each layer in
120
120
If an `Entrypoint` value is not specified, then the first entry of the `Cmd` array should be interpreted as the executable to run.
121
121
122
122
-**Volumes***object*, OPTIONAL
123
-
A set of directories which should be created as data volumes in a container running this image. This field MAY be "null".
124
-
If a file or folder exists within the image with the same path as a data volume, that file or folder is replaced with the data volume and is never merged. **NOTE:** This JSON structure value is unusual because it is a direct JSON serialization of the Go type <code>map[string]struct{}</code> and is represented in JSON as an object mapping its keys to an empty object.
125
123
126
-
-**WorkingDir***string*, REQUIRED
124
+
A set of directories which should be created as data volumes in a container running this image. This field MAY be null.
125
+
If a file or folder exists within the image with the same path as a data volume, that file or folder is replaced with the data volume and is never merged. **NOTE:** This JSON structure value is unusual because it is a direct JSON serialization of the Go type `map[string]struct{}` and is represented in JSON as an object mapping its keys to an empty object.
126
+
127
+
-**WorkingDir***string*, OPTIONAL
127
128
128
129
Sets the current working directory of the entrypoint process in the container.
129
130
This value acts as a default and is replaced by a working directory specified when creating a container.
@@ -133,41 +134,41 @@ Since the configuration JSON that gets hashed references hashes of each layer in
133
134
The rootfs key references the layer content addresses used by the image.
134
135
This makes the image config hash depend on the filesystem hash.
135
136
136
-
-**type***string*, REQUIRED
137
+
-**type***string*, REQUIRED
137
138
138
-
MUST be set to `layers`.
139
-
Implementations MUST generate an error if they encounter a unknown value while verifying or unpacking an image.
139
+
MUST be set to `layers`.
140
+
Implementations MUST generate an error if they encounter a unknown value while verifying or unpacking an image.
140
141
141
-
-**diff_ids***array*, REQUIRED
142
+
-**diff_ids***array*, REQUIRED
142
143
143
-
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 bottom-most to top-most.
144
145
145
-
-**history***array of object*
146
+
-**history***array of object*, REQUIRED
146
147
147
-
Describes the history of each layer.
148
-
The array is ordered from bottom-most layer to top-most layer.
149
-
The object has the following fields:
148
+
Describes the history of each layer.
149
+
The array is ordered from bottom-most layer to top-most layer.
150
+
The object has the following fields:
150
151
151
-
-**created***string*, OPTIONAL
152
+
-**created***string*, OPTIONAL
152
153
153
-
Creation time, expressed as a ISO-8601 formatted combined date and time
154
+
Creation time, expressed as a ISO-8601 formatted combined date and time
154
155
155
-
-**author***string*, OPTIONAL
156
+
-**author***string*, OPTIONAL
156
157
157
-
The author of the build point.
158
+
The author of the build point.
158
159
159
-
-**created_by***string*, OPTIONAL
160
+
-**created_by***string*, OPTIONAL
160
161
161
-
The command which created the layer.
162
+
The command which created the layer.
162
163
163
-
-**comment***string*, OPTIONAL
164
+
-**comment***string*, OPTIONAL
164
165
165
-
A custom message set when creating the layer.
166
+
A custom message set when creating the layer.
166
167
167
-
-**empty_layer***string*
168
+
-**empty_layer***boolean*, OPTIONAL
168
169
169
-
This field is used to mark if the history item created a filesystem diff, OPTIONAL
170
-
It is set to true if this history item doesn't correspond to an actual layer in the rootfs section (for example, a command like ENV which results in no change to the filesystem).
170
+
This field is used to mark if the history item created a filesystem diff, OPTIONAL
171
+
It is set to true if this history item doesn't correspond to an actual layer in the rootfs section (for example, a command like ENV which results in no change to the filesystem).
171
172
172
173
Any extra fields in the Image JSON struct are considered implementation specific and should be ignored by any implementations which are unable to interpret them.
0 commit comments