From f33370219bf1b96a107e051f95c46b0551b6ccaa Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Aug 2023 13:00:24 +0200 Subject: [PATCH 1/3] image/spec: add missing "OnBuild" field This field was added in commit 9f994c96468e2495a2dc118355b6565e7dac0f44, which was merged before the image-spec v1.0.0 was released (which happened in commit 79910625f0a7aa76590e4362817dda22f28343aa). This patch backfills the specifications to describe the property. Signed-off-by: Sebastiaan van Stijn --- image/spec/v1.1.md | 10 ++++++++++ image/spec/v1.2.md | 10 ++++++++++ image/spec/v1.md | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/image/spec/v1.1.md b/image/spec/v1.1.md index 0a473da6a4..fc33d35a15 100644 --- a/image/spec/v1.1.md +++ b/image/spec/v1.1.md @@ -349,6 +349,16 @@ whitespace. It has been added to this example for clarity. in the container. This value acts as a default and is replaced by a working directory specified when creating a container. +
+ OnBuild array of strings +
+
+ 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. +
diff --git a/image/spec/v1.2.md b/image/spec/v1.2.md index cce8c843d6..93e63ac950 100644 --- a/image/spec/v1.2.md +++ b/image/spec/v1.2.md @@ -405,6 +405,16 @@ whitespace. It has been added to this example for clarity. in the container. This value acts as a default and is replaced by a working directory specified when creating a container. +
+ OnBuild array of strings +
+
+ 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. +
diff --git a/image/spec/v1.md b/image/spec/v1.md index a6be1f23b4..84932b977b 100644 --- a/image/spec/v1.md +++ b/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 by a working directory specified when creating a container. +
+ OnBuild array of strings +
+
+ 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. +
From 5380f3f0c4a74b839631925ef823e71d4c533642 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Aug 2023 13:25:00 +0200 Subject: [PATCH 2/3] image/spec: add missing "ArgsEscaped" field (v1.1, v1.2) This field was added in 9db5db1b94bc1000d151315851096dcc6cd3512d, which was part of v1.10.0-rc1 and later, which used image spec v1.1.0. It's worth noting that documentation for the v1.1.0 image spec was not yet available until commit 4fa0eccd10c5c120fe1f641285db920cf643dbe8, which was included in v1.12.0-rc1 and up. The `ArgsEscaped` field was also adopted by the OCI image spec since [v1.1.0-rc3][1], but considered deprecated, and not recommended to be used. This patch amends the v1.1 and v1.2 specifications to describe the field. [1]: https://github.com/opencontainers/image-spec/commit/59780aa56914ae9cf4ca68c10989d3f89337d1e0 Signed-off-by: Sebastiaan van Stijn --- image/spec/v1.1.md | 12 ++++++++++++ image/spec/v1.2.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/image/spec/v1.1.md b/image/spec/v1.1.md index fc33d35a15..f056faad58 100644 --- a/image/spec/v1.1.md +++ b/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 Cmd array should be interpreted as the executable to run. +
+ ArgsEscaped boolean +
+
+ Used for Windows images to indicate that the Entrypoint + or Cmd 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 Entrypoint or CmdCmd + should be used as-is to avoid double escaping. + Note, the exact behavior of ArgsEscaped is complex + and subject to implementation details. +
Volumes struct
diff --git a/image/spec/v1.2.md b/image/spec/v1.2.md index 93e63ac950..5e409fbd65 100644 --- a/image/spec/v1.2.md +++ b/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 Cmd array should be interpreted as the executable to run. +
+ ArgsEscaped boolean +
+
+ Used for Windows images to indicate that the Entrypoint + or Cmd 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 Entrypoint or CmdCmd + should be used as-is to avoid double escaping. + Note, the exact behavior of ArgsEscaped is complex + and subject to implementation details. +
Healthcheck struct
From 7b7019a4da3918c9c2949b6e52e8d0d79b3059df Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Aug 2023 14:33:11 +0200 Subject: [PATCH 3/3] image/spec: add missing "Shell" field (v1.2) This field was added in b18ae8c9ccc2eb6cf8aa947f25eb6f1d20089776, which was part of v1.12.0-rc1 and later, which used image spec v1.2.0. This patch amends the v1.2 spec to include the missing field. Signed-off-by: Sebastiaan van Stijn --- image/spec/v1.2.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/image/spec/v1.2.md b/image/spec/v1.2.md index 5e409fbd65..deccee18bd 100644 --- a/image/spec/v1.2.md +++ b/image/spec/v1.2.md @@ -427,6 +427,17 @@ whitespace. It has been added to this example for clarity. downstream build, as if it had been inserted immediately after the *FROM* instruction in the downstream Dockerfile. +
+ Shell array of strings +
+
+ Override the default shell used for the *shell* form of + commands during "build". The default shell on Linux is + ["/bin/sh", "-c"], and ["cmd", "/S", "/C"] + on Windows. This field is set by the SHELL + instruction in a Dockerfile, and *must* be written in JSON + form. +