浏览代码

Merge pull request #46371 from thaJeztah/image_specs_amend

image/specs: add missing OnBuild (v1.0), ArgsEscaped (v1.1), and Shell (v1.2) fields
Sebastiaan van Stijn 1 年之前
父节点
当前提交
daa4618da8
共有 3 个文件被更改,包括 65 次插入0 次删除
  1. 22 0
      image/spec/v1.1.md
  2. 33 0
      image/spec/v1.2.md
  3. 10 0
      image/spec/v1.md

+ 22 - 0
image/spec/v1.1.md

@@ -326,6 +326,18 @@ whitespace. It has been added to this example for clarity.
                 not specified, then the first entry of the <code>Cmd</code>
                 not specified, then the first entry of the <code>Cmd</code>
                 array should be interpreted as the executable to run.
                 array should be interpreted as the executable to run.
             </dd>
             </dd>
+            <dt>
+                ArgsEscaped <code>boolean</code>
+            </dt>
+            <dd>
+                Used for Windows images to indicate that the <code>Entrypoint</code>
+                or <code>Cmd</code> or both, contain only a single element array
+                that is a pre-escaped, and combined into a single string, **CommandLine**.
+                If "true", the value in <code>Entrypoint</code> or <code>Cmd</code>Cmd
+                should be used as-is to avoid double escaping.
+                Note, the exact behavior of <code>ArgsEscaped</code> is complex
+                and subject to implementation details.
+            </dd>
             <dt>
             <dt>
                 Volumes <code>struct</code>
                 Volumes <code>struct</code>
             </dt>
             </dt>
@@ -349,6 +361,16 @@ whitespace. It has been added to this example for clarity.
                 in the container. This value acts as a default and is replaced
                 in the container. This value acts as a default and is replaced
                 by a working directory specified when creating a container.
                 by a working directory specified when creating a container.
             </dd>
             </dd>
+            <dt>
+                OnBuild <code>array of strings</code>
+            </dt>
+            <dd>
+                This metadata defines "trigger" instructions to be executed at
+                a later time, when the image is used as the base for another
+                build. Each trigger will be executed in the context of the
+                downstream build, as if it had been inserted immediately after
+                the *FROM* instruction in the downstream Dockerfile.
+            </dd>
         </dl>
         </dl>
     </dd>
     </dd>
     <dt>
     <dt>

+ 33 - 0
image/spec/v1.2.md

@@ -326,6 +326,18 @@ whitespace. It has been added to this example for clarity.
                 not specified, then the first entry of the <code>Cmd</code>
                 not specified, then the first entry of the <code>Cmd</code>
                 array should be interpreted as the executable to run.
                 array should be interpreted as the executable to run.
             </dd>
             </dd>
+            <dt>
+                ArgsEscaped <code>boolean</code>
+            </dt>
+            <dd>
+                Used for Windows images to indicate that the <code>Entrypoint</code>
+                or <code>Cmd</code> or both, contain only a single element array
+                that is a pre-escaped, and combined into a single string, **CommandLine**.
+                If "true", the value in <code>Entrypoint</code> or <code>Cmd</code>Cmd
+                should be used as-is to avoid double escaping.
+                Note, the exact behavior of <code>ArgsEscaped</code> is complex
+                and subject to implementation details.
+            </dd>
             <dt>
             <dt>
                 Healthcheck <code>struct</code>
                 Healthcheck <code>struct</code>
             </dt>
             </dt>
@@ -405,6 +417,27 @@ whitespace. It has been added to this example for clarity.
                 in the container. This value acts as a default and is replaced
                 in the container. This value acts as a default and is replaced
                 by a working directory specified when creating a container.
                 by a working directory specified when creating a container.
             </dd>
             </dd>
+            <dt>
+                OnBuild <code>array of strings</code>
+            </dt>
+            <dd>
+                This metadata defines "trigger" instructions to be executed at
+                a later time, when the image is used as the base for another
+                build. Each trigger will be executed in the context of the
+                downstream build, as if it had been inserted immediately after
+                the *FROM* instruction in the downstream Dockerfile.
+            </dd>
+            <dt>
+                Shell <code>array of strings</code>
+            </dt>
+            <dd>
+                Override the default shell used for the *shell* form of
+                commands during "build". The default shell on Linux is
+                <code>["/bin/sh", "-c"]</code>, and <code>["cmd", "/S", "/C"]</code>
+                on Windows. This field is set by the <code>SHELL</code>
+                instruction in a Dockerfile, and *must* be written in JSON
+                form.
+            </dd>
         </dl>
         </dl>
     </dd>
     </dd>
     <dt>
     <dt>

+ 10 - 0
image/spec/v1.md

@@ -368,6 +368,16 @@ Here is an example image JSON file:
                 in the container. This value acts as a default and is replaced
                 in the container. This value acts as a default and is replaced
                 by a working directory specified when creating a container.
                 by a working directory specified when creating a container.
             </dd>
             </dd>
+            <dt>
+                OnBuild <code>array of strings</code>
+            </dt>
+            <dd>
+                This metadata defines "trigger" instructions to be executed at
+                a later time, when the image is used as the base for another
+                build. Each trigger will be executed in the context of the
+                downstream build, as if it had been inserted immediately after
+                the *FROM* instruction in the downstream Dockerfile.
+            </dd>
         </dl>
         </dl>
     </dd>
     </dd>
 </dl>
 </dl>