Skip to content

Commit 4fb59c2

Browse files
committed
image spec formatting fix
Embedded new lines aren't interpreted correctly in markdown renderers (they are treated as preformatted text instead). I removed the embedded newlines in the docker image spec. Signed-off-by: Alex Goodman <[email protected]>
1 parent 996eb78 commit 4fb59c2

3 files changed

Lines changed: 21 additions & 65 deletions

File tree

image/spec/v1.1.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,7 @@ whitespace. It has been added to this example for clarity.
223223
container using the image. This field can be <code>null</code>, in
224224
which case any execution parameters should be specified at creation of
225225
the container.
226-
227226
<h4>Container RunConfig Field Descriptions</h4>
228-
229227
<dl>
230228
<dt>
231229
User <code>string</code>
@@ -234,9 +232,7 @@ whitespace. It has been added to this example for clarity.
234232
<p>The username or UID which the process in the container should
235233
run as. This acts as a default value to use when the value is
236234
not specified when creating a container.</p>
237-
238235
<p>All of the following are valid:</p>
239-
240236
<ul>
241237
<li><code>user</code></li>
242238
<li><code>uid</code></li>
@@ -245,7 +241,6 @@ whitespace. It has been added to this example for clarity.
245241
<li><code>uid:group</code></li>
246242
<li><code>user:gid</code></li>
247243
</ul>
248-
249244
<p>If <code>group</code>/<code>gid</code> is not specified, the
250245
default group and supplementary groups of the given
251246
<code>user</code>/<code>uid</code> in <code>/etc/passwd</code>
@@ -284,13 +279,11 @@ whitespace. It has been added to this example for clarity.
284279
<code>map[string]struct{}</code> and is represented in JSON as
285280
an object mapping its keys to an empty object. Here is an
286281
example:
287-
288282
<pre>{
289283
"8080": {},
290284
"53/udp": {},
291285
"2356/tcp": {}
292286
}</pre>
293-
294287
Its keys can be in the format of:
295288
<ul>
296289
<li>
@@ -304,10 +297,8 @@ whitespace. It has been added to this example for clarity.
304297
</li>
305298
</ul>
306299
with the default protocol being <code>"tcp"</code> if not
307-
specified.
308-
309-
These values act as defaults and are merged with any specified
310-
when creating a container.
300+
specified. These values act as defaults and are merged with any
301+
specified when creating a container.
311302
</dd>
312303
<dt>
313304
Env <code>array of strings</code>
@@ -367,7 +358,6 @@ whitespace. It has been added to this example for clarity.
367358
The rootfs key references the layer content addresses used by the
368359
image. This makes the image config hash depend on the filesystem hash.
369360
rootfs has two subkeys:
370-
371361
<ul>
372362
<li>
373363
<code>type</code> is usually set to <code>layers</code>.
@@ -376,10 +366,7 @@ whitespace. It has been added to this example for clarity.
376366
<code>diff_ids</code> is an array of layer content hashes (<code>DiffIDs</code>), in order from bottom-most to top-most.
377367
</li>
378368
</ul>
379-
380-
381369
Here is an example rootfs section:
382-
383370
<pre>"rootfs": {
384371
"diff_ids": [
385372
"sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
@@ -396,7 +383,6 @@ whitespace. It has been added to this example for clarity.
396383
<code>history</code> is an array of objects describing the history of
397384
each layer. The array is ordered from bottom-most layer to top-most
398385
layer. The object has the following fields.
399-
400386
<ul>
401387
<li>
402388
<code>created</code>: Creation time, expressed as a ISO-8601 formatted

image/spec/v1.2.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,7 @@ whitespace. It has been added to this example for clarity.
223223
container using the image. This field can be <code>null</code>, in
224224
which case any execution parameters should be specified at creation of
225225
the container.
226-
227226
<h4>Container RunConfig Field Descriptions</h4>
228-
229227
<dl>
230228
<dt>
231229
User <code>string</code>
@@ -234,9 +232,7 @@ whitespace. It has been added to this example for clarity.
234232
<p>The username or UID which the process in the container should
235233
run as. This acts as a default value to use when the value is
236234
not specified when creating a container.</p>
237-
238235
<p>All of the following are valid:</p>
239-
240236
<ul>
241237
<li><code>user</code></li>
242238
<li><code>uid</code></li>
@@ -245,7 +241,6 @@ whitespace. It has been added to this example for clarity.
245241
<li><code>uid:group</code></li>
246242
<li><code>user:gid</code></li>
247243
</ul>
248-
249244
<p>If <code>group</code>/<code>gid</code> is not specified, the
250245
default group and supplementary groups of the given
251246
<code>user</code>/<code>uid</code> in <code>/etc/passwd</code>
@@ -284,13 +279,11 @@ whitespace. It has been added to this example for clarity.
284279
<code>map[string]struct{}</code> and is represented in JSON as
285280
an object mapping its keys to an empty object. Here is an
286281
example:
287-
288282
<pre>{
289283
"8080": {},
290284
"53/udp": {},
291285
"2356/tcp": {}
292286
}</pre>
293-
294287
Its keys can be in the format of:
295288
<ul>
296289
<li>
@@ -304,10 +297,8 @@ whitespace. It has been added to this example for clarity.
304297
</li>
305298
</ul>
306299
with the default protocol being <code>"tcp"</code> if not
307-
specified.
308-
309-
These values act as defaults and are merged with any specified
310-
when creating a container.
300+
specified. These values act as defaults and are merged with
301+
any specified when creating a container.
311302
</dd>
312303
<dt>
313304
Env <code>array of strings</code>
@@ -364,7 +355,6 @@ whitespace. It has been added to this example for clarity.
364355
<li><code>["CMD", arg1, arg2, ...]</code> : exec arguments directly</li>
365356
<li><code>["CMD-SHELL", command]</code> : run command with system's default shell</li>
366357
</ul>
367-
368358
The test command should exit with a status of 0 if the container is healthy,
369359
or with 1 if it is unhealthy.
370360
</dd>
@@ -387,12 +377,10 @@ whitespace. It has been added to this example for clarity.
387377
The number of consecutive failures needed to consider a container as unhealthy.
388378
</dd>
389379
</dl>
390-
391380
In each case, the field can be omitted to indicate that the
392-
value should be inherited from the base layer.
393-
394-
These values act as defaults and are merged with any specified
395-
when creating a container.
381+
value should be inherited from the base layer. These values act
382+
as defaults and are merged with any specified when creating a
383+
container.
396384
</dd>
397385
<dt>
398386
Volumes <code>struct</code>
@@ -426,7 +414,6 @@ whitespace. It has been added to this example for clarity.
426414
The rootfs key references the layer content addresses used by the
427415
image. This makes the image config hash depend on the filesystem hash.
428416
rootfs has two subkeys:
429-
430417
<ul>
431418
<li>
432419
<code>type</code> is usually set to <code>layers</code>.
@@ -435,10 +422,7 @@ whitespace. It has been added to this example for clarity.
435422
<code>diff_ids</code> is an array of layer content hashes (<code>DiffIDs</code>), in order from bottom-most to top-most.
436423
</li>
437424
</ul>
438-
439-
440425
Here is an example rootfs section:
441-
442426
<pre>"rootfs": {
443427
"diff_ids": [
444428
"sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
@@ -455,7 +439,6 @@ whitespace. It has been added to this example for clarity.
455439
<code>history</code> is an array of objects describing the history of
456440
each layer. The array is ordered from bottom-most layer to top-most
457441
layer. The object has the following fields.
458-
459442
<ul>
460443
<li>
461444
<code>created</code>: Creation time, expressed as a ISO-8601 formatted
@@ -478,9 +461,7 @@ whitespace. It has been added to this example for clarity.
478461
filesystem).
479462
</li>
480463
</ul>
481-
482-
Here is an example history section:
483-
464+
Here is an example history section:
484465
<pre>"history": [
485466
{
486467
"created": "2015-10-31T22:22:54.690851953Z",

image/spec/v1.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ This specification uses the following terms:
1717
<dd>
1818
Images are composed of <i>layers</i>. <i>Image layer</i> is a general
1919
term which may be used to refer to one or both of the following:
20-
2120
<ol>
2221
<li>The metadata for the layer, described in the JSON format.</li>
2322
<li>The filesystem changes described by a layer.</li>
2423
</ol>
25-
2624
To refer to the former you may use the term <i>Layer JSON</i> or
2725
<i>Layer Metadata</i>. To refer to the latter you may use the term
2826
<i>Image Filesystem Changeset</i> or <i>Image Diff</i>.
@@ -244,9 +242,7 @@ Here is an example image JSON file:
244242
container using the image. This field can be <code>null</code>, in
245243
which case any execution parameters should be specified at creation of
246244
the container.
247-
248245
<h4>Container RunConfig Field Descriptions</h4>
249-
250246
<dl>
251247
<dt>
252248
User <code>string</code>
@@ -255,9 +251,7 @@ Here is an example image JSON file:
255251
<p>The username or UID which the process in the container should
256252
run as. This acts as a default value to use when the value is
257253
not specified when creating a container.</p>
258-
259254
<p>All of the following are valid:</p>
260-
261255
<ul>
262256
<li><code>user</code></li>
263257
<li><code>uid</code></li>
@@ -266,7 +260,6 @@ Here is an example image JSON file:
266260
<li><code>uid:group</code></li>
267261
<li><code>user:gid</code></li>
268262
</ul>
269-
270263
<p>If <code>group</code>/<code>gid</code> is not specified, the
271264
default group and supplementary groups of the given
272265
<code>user</code>/<code>uid</code> in <code>/etc/passwd</code>
@@ -305,13 +298,11 @@ Here is an example image JSON file:
305298
<code>map[string]struct{}</code> and is represented in JSON as
306299
an object mapping its keys to an empty object. Here is an
307300
example:
308-
309301
<pre>{
310302
"8080": {},
311303
"53/udp": {},
312304
"2356/tcp": {}
313305
}</pre>
314-
315306
Its keys can be in the format of:
316307
<ul>
317308
<li>
@@ -325,9 +316,7 @@ Here is an example image JSON file:
325316
</li>
326317
</ul>
327318
with the default protocol being <code>"tcp"</code> if not
328-
specified.
329-
330-
These values act as defaults and are merged with any specified
319+
specified. These values act as defaults and are merged with any specified
331320
when creating a container.
332321
</dd>
333322
<dt>
@@ -502,21 +491,21 @@ For example, here's what the full archive of `library/busybox` is (displayed in
502491
```
503492
.
504493
├── 5785b62b697b99a5af6cd5d0aabc804d5748abbb6d3d07da5d1d3795f2dcc83e
505-
   ├── VERSION
506-
   ├── json
507-
   └── layer.tar
494+
├── VERSION
495+
├── json
496+
└── layer.tar
508497
├── a7b8b41220991bfc754d7ad445ad27b7f272ab8b4a2c175b9512b97471d02a8a
509-
   ├── VERSION
510-
   ├── json
511-
   └── layer.tar
498+
├── VERSION
499+
├── json
500+
└── layer.tar
512501
├── a936027c5ca8bf8f517923169a233e391cbb38469a75de8383b5228dc2d26ceb
513-
   ├── VERSION
514-
   ├── json
515-
   └── layer.tar
502+
├── VERSION
503+
├── json
504+
└── layer.tar
516505
├── f60c56784b832dd990022afc120b8136ab3da9528094752ae13fe63a2d28dc8c
517-
   ├── VERSION
518-
   ├── json
519-
   └── layer.tar
506+
├── VERSION
507+
├── json
508+
└── layer.tar
520509
└── repositories
521510
```
522511

0 commit comments

Comments
 (0)