Skip to content

Commit a6d7fb1

Browse files
committed
config: Fix "Serialization" -> "Configuration" in the title
This didn't make it into 17c1f00 (*: rename serialization.md -> config.md, 2016-09-13, opencontainers#305), but I think we still want it [1,2,3]. While I was touching headers, I shifted the informative example section down under the normative property definitions, and move the normative whitespace rule up out of the example section. [1]: opencontainers#255 (comment) [2]: opencontainers#305 (comment) [3]: opencontainers#305 (comment) Signed-off-by: W. Trevor King <[email protected]>
1 parent 55a3d9e commit a6d7fb1

File tree

1 file changed

+61
-62
lines changed

1 file changed

+61
-62
lines changed

config.md

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OCI Image Serialization
1+
# Image Configuration
22

33
An *Image* is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime.
44
This specification outlines the JSON format describing images for use with a container runtime and execution tool and its relationship to filesystem changesets, described in [Layers](layer.md).
@@ -56,67 +56,7 @@ This specification uses the following terms:
5656
</dd>
5757
</dl>
5858

59-
## Image Configuration
60-
61-
Here is an example image configuration JSON document:
62-
63-
```json,title=Image%20JSON&mediatype=application/vnd.oci.image.config.v1%2Bjson
64-
{
65-
"created": "2015-10-31T22:22:56.015925234Z",
66-
"author": "Alyssa P. Hacker <[email protected]>",
67-
"architecture": "amd64",
68-
"os": "linux",
69-
"config": {
70-
"User": "alice",
71-
"Memory": 2048,
72-
"MemorySwap": 4096,
73-
"CpuShares": 8,
74-
"ExposedPorts": {
75-
"8080/tcp": {}
76-
},
77-
"Env": [
78-
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
79-
"FOO=oci_is_a",
80-
"BAR=well_written_spec"
81-
],
82-
"Entrypoint": [
83-
"/bin/my-app-binary"
84-
],
85-
"Cmd": [
86-
"--foreground",
87-
"--config",
88-
"/etc/my-app.d/default.cfg"
89-
],
90-
"Volumes": {
91-
"/var/job-result-data": {},
92-
"/var/log/my-app-logs": {}
93-
},
94-
"WorkingDir": "/home/alice"
95-
},
96-
"rootfs": {
97-
"diff_ids": [
98-
"sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
99-
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
100-
],
101-
"type": "layers"
102-
},
103-
"history": [
104-
{
105-
"created": "2015-10-31T22:22:54.690851953Z",
106-
"created_by": "/bin/sh -c #(nop) ADD file:a3bc1e842b69636f9df5256c49c5374fb4eef1e281fe3f282c65fb853ee171c5 in /"
107-
},
108-
{
109-
"created": "2015-10-31T22:22:55.613815829Z",
110-
"created_by": "/bin/sh -c #(nop) CMD [\"sh\"]",
111-
"empty_layer": true
112-
}
113-
]
114-
}
115-
```
116-
117-
Note: whitespace has been added to this example for clarity. Whitespace is OPTIONAL and implementations MAY have compact JSON with no whitespace.
118-
119-
### Image JSON Field Descriptions
59+
## Properties
12060

12161
<dl>
12262
<dt>
@@ -365,3 +305,62 @@ Here is an example history section:
365305
</dl>
366306

367307
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.
308+
Whitespace is OPTIONAL and implementations MAY have compact JSON with no whitespace.
309+
310+
## Example
311+
312+
Here is an example image configuration JSON document:
313+
314+
```json,title=Image%20JSON&mediatype=application/vnd.oci.image.config.v1%2Bjson
315+
{
316+
"created": "2015-10-31T22:22:56.015925234Z",
317+
"author": "Alyssa P. Hacker <[email protected]>",
318+
"architecture": "amd64",
319+
"os": "linux",
320+
"config": {
321+
"User": "alice",
322+
"Memory": 2048,
323+
"MemorySwap": 4096,
324+
"CpuShares": 8,
325+
"ExposedPorts": {
326+
"8080/tcp": {}
327+
},
328+
"Env": [
329+
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
330+
"FOO=oci_is_a",
331+
"BAR=well_written_spec"
332+
],
333+
"Entrypoint": [
334+
"/bin/my-app-binary"
335+
],
336+
"Cmd": [
337+
"--foreground",
338+
"--config",
339+
"/etc/my-app.d/default.cfg"
340+
],
341+
"Volumes": {
342+
"/var/job-result-data": {},
343+
"/var/log/my-app-logs": {}
344+
},
345+
"WorkingDir": "/home/alice"
346+
},
347+
"rootfs": {
348+
"diff_ids": [
349+
"sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
350+
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
351+
],
352+
"type": "layers"
353+
},
354+
"history": [
355+
{
356+
"created": "2015-10-31T22:22:54.690851953Z",
357+
"created_by": "/bin/sh -c #(nop) ADD file:a3bc1e842b69636f9df5256c49c5374fb4eef1e281fe3f282c65fb853ee171c5 in /"
358+
},
359+
{
360+
"created": "2015-10-31T22:22:55.613815829Z",
361+
"created_by": "/bin/sh -c #(nop) CMD [\"sh\"]",
362+
"empty_layer": true
363+
}
364+
]
365+
}
366+
```

0 commit comments

Comments
 (0)