From 4fb59c20a4fb54f944fe170d0ff1d00eb4a24d6f Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Sun, 13 May 2018 12:53:05 -0400 Subject: [PATCH] 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 --- image/spec/v1.1.md | 18 ++---------------- image/spec/v1.2.md | 31 ++++++------------------------- image/spec/v1.md | 37 +++++++++++++------------------------ 3 files changed, 21 insertions(+), 65 deletions(-) diff --git a/image/spec/v1.1.md b/image/spec/v1.1.md index ce761f112a..de74d91a19 100644 --- a/image/spec/v1.1.md +++ b/image/spec/v1.1.md @@ -223,9 +223,7 @@ whitespace. It has been added to this example for clarity. container using the image. This field can be null, in which case any execution parameters should be specified at creation of the container. -

Container RunConfig Field Descriptions

-
User string @@ -234,9 +232,7 @@ whitespace. It has been added to this example for clarity.

The username or UID which the process in the container should run as. This acts as a default value to use when the value is not specified when creating a container.

-

All of the following are valid:

-
  • user
  • uid
  • @@ -245,7 +241,6 @@ whitespace. It has been added to this example for clarity.
  • uid:group
  • user:gid
-

If group/gid is not specified, the default group and supplementary groups of the given user/uid in /etc/passwd @@ -284,13 +279,11 @@ whitespace. It has been added to this example for clarity. map[string]struct{} and is represented in JSON as an object mapping its keys to an empty object. Here is an example: -

{
     "8080": {},
     "53/udp": {},
     "2356/tcp": {}
 }
- Its keys can be in the format of:
  • @@ -304,10 +297,8 @@ whitespace. It has been added to this example for clarity.
with the default protocol being "tcp" if not - specified. - - These values act as defaults and are merged with any specified - when creating a container. + specified. These values act as defaults and are merged with any + specified when creating a container.
Env array of strings @@ -367,7 +358,6 @@ whitespace. It has been added to this example for clarity. The rootfs key references the layer content addresses used by the image. This makes the image config hash depend on the filesystem hash. rootfs has two subkeys: -
  • type is usually set to layers. @@ -376,10 +366,7 @@ whitespace. It has been added to this example for clarity. diff_ids is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most.
- - Here is an example rootfs section: -
"rootfs": {
   "diff_ids": [
     "sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
@@ -396,7 +383,6 @@ whitespace. It has been added to this example for clarity.
         history is an array of objects describing the history of
         each layer. The array is ordered from bottom-most layer to top-most
         layer. The object has the following fields.
-
         
  • created: Creation time, expressed as a ISO-8601 formatted diff --git a/image/spec/v1.2.md b/image/spec/v1.2.md index 789680c7a7..2ea3feec92 100644 --- a/image/spec/v1.2.md +++ b/image/spec/v1.2.md @@ -223,9 +223,7 @@ whitespace. It has been added to this example for clarity. container using the image. This field can be null, in which case any execution parameters should be specified at creation of the container. -

    Container RunConfig Field Descriptions

    -
    User string @@ -234,9 +232,7 @@ whitespace. It has been added to this example for clarity.

    The username or UID which the process in the container should run as. This acts as a default value to use when the value is not specified when creating a container.

    -

    All of the following are valid:

    -
    • user
    • uid
    • @@ -245,7 +241,6 @@ whitespace. It has been added to this example for clarity.
    • uid:group
    • user:gid
    -

    If group/gid is not specified, the default group and supplementary groups of the given user/uid in /etc/passwd @@ -284,13 +279,11 @@ whitespace. It has been added to this example for clarity. map[string]struct{} and is represented in JSON as an object mapping its keys to an empty object. Here is an example: -

    {
         "8080": {},
         "53/udp": {},
         "2356/tcp": {}
     }
    - Its keys can be in the format of:
    • @@ -304,10 +297,8 @@ whitespace. It has been added to this example for clarity.
    with the default protocol being "tcp" if not - specified. - - These values act as defaults and are merged with any specified - when creating a container. + specified. These values act as defaults and are merged with + any specified when creating a container.
    Env array of strings @@ -364,7 +355,6 @@ whitespace. It has been added to this example for clarity.
  • ["CMD", arg1, arg2, ...] : exec arguments directly
  • ["CMD-SHELL", command] : run command with system's default shell
- The test command should exit with a status of 0 if the container is healthy, or with 1 if it is unhealthy. @@ -387,12 +377,10 @@ whitespace. It has been added to this example for clarity. The number of consecutive failures needed to consider a container as unhealthy.
- In each case, the field can be omitted to indicate that the - value should be inherited from the base layer. - - These values act as defaults and are merged with any specified - when creating a container. + value should be inherited from the base layer. These values act + as defaults and are merged with any specified when creating a + container.
Volumes struct @@ -426,7 +414,6 @@ whitespace. It has been added to this example for clarity. The rootfs key references the layer content addresses used by the image. This makes the image config hash depend on the filesystem hash. rootfs has two subkeys: -
  • type is usually set to layers. @@ -435,10 +422,7 @@ whitespace. It has been added to this example for clarity. diff_ids is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most.
- - Here is an example rootfs section: -
"rootfs": {
   "diff_ids": [
     "sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
@@ -455,7 +439,6 @@ whitespace. It has been added to this example for clarity.
         history is an array of objects describing the history of
         each layer. The array is ordered from bottom-most layer to top-most
         layer. The object has the following fields.
-
         
  • created: Creation time, expressed as a ISO-8601 formatted @@ -478,9 +461,7 @@ whitespace. It has been added to this example for clarity. filesystem).
- -Here is an example history section: - + Here is an example history section:
"history": [
   {
     "created": "2015-10-31T22:22:54.690851953Z",
diff --git a/image/spec/v1.md b/image/spec/v1.md
index fce3a06e36..c1415947f1 100644
--- a/image/spec/v1.md
+++ b/image/spec/v1.md
@@ -17,12 +17,10 @@ This specification uses the following terms:
     
Images are composed of layers. Image layer is a general term which may be used to refer to one or both of the following: -
  1. The metadata for the layer, described in the JSON format.
  2. The filesystem changes described by a layer.
- To refer to the former you may use the term Layer JSON or Layer Metadata. To refer to the latter you may use the term Image Filesystem Changeset or Image Diff. @@ -244,9 +242,7 @@ Here is an example image JSON file: container using the image. This field can be null, in which case any execution parameters should be specified at creation of the container. -

Container RunConfig Field Descriptions

-
User string @@ -255,9 +251,7 @@ Here is an example image JSON file:

The username or UID which the process in the container should run as. This acts as a default value to use when the value is not specified when creating a container.

-

All of the following are valid:

-
  • user
  • uid
  • @@ -266,7 +260,6 @@ Here is an example image JSON file:
  • uid:group
  • user:gid
-

If group/gid is not specified, the default group and supplementary groups of the given user/uid in /etc/passwd @@ -305,13 +298,11 @@ Here is an example image JSON file: map[string]struct{} and is represented in JSON as an object mapping its keys to an empty object. Here is an example: -

{
     "8080": {},
     "53/udp": {},
     "2356/tcp": {}
 }
- Its keys can be in the format of:
  • @@ -325,9 +316,7 @@ Here is an example image JSON file:
with the default protocol being "tcp" if not - specified. - - These values act as defaults and are merged with any specified + specified. These values act as defaults and are merged with any specified when creating a container.
@@ -502,21 +491,21 @@ For example, here's what the full archive of `library/busybox` is (displayed in ``` . ├── 5785b62b697b99a5af6cd5d0aabc804d5748abbb6d3d07da5d1d3795f2dcc83e -│   ├── VERSION -│   ├── json -│   └── layer.tar +│ ├── VERSION +│ ├── json +│ └── layer.tar ├── a7b8b41220991bfc754d7ad445ad27b7f272ab8b4a2c175b9512b97471d02a8a -│   ├── VERSION -│   ├── json -│   └── layer.tar +│ ├── VERSION +│ ├── json +│ └── layer.tar ├── a936027c5ca8bf8f517923169a233e391cbb38469a75de8383b5228dc2d26ceb -│   ├── VERSION -│   ├── json -│   └── layer.tar +│ ├── VERSION +│ ├── json +│ └── layer.tar ├── f60c56784b832dd990022afc120b8136ab3da9528094752ae13fe63a2d28dc8c -│   ├── VERSION -│   ├── json -│   └── layer.tar +│ ├── VERSION +│ ├── json +│ └── layer.tar └── repositories ```