From f2b6e6e20ac78af5f426c74e5b408a25161eee61 Mon Sep 17 00:00:00 2001 From: Kevin Parsons Date: Wed, 24 Mar 2021 01:46:30 -0700 Subject: [PATCH] Add ArgsEscaped field to image config This change officially adds ArgsEscaped to the image config. This field has already been used by Docker for several years, so adding it here allows images that depend on its behavior to work with other runtimes. Signed-off-by: Kevin Parsons --- config.md | 4 ++++ schema/config-schema.json | 3 +++ specs-go/v1/config.go | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/config.md b/config.md index 398296ae4..4d384b87f 100644 --- a/config.md +++ b/config.md @@ -165,6 +165,10 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a The field contains the system call signal that will be sent to the container to exit. The signal can be a signal name in the format `SIGNAME`, for instance `SIGKILL` or `SIGRTMIN+3`. + - **ArgsEscaped** *boolean*, OPTIONAL + + This field is used for Windows images to indicate that the `Entrypoint` and `Cmd` fields will have only a single element, which has already been escaped. In this case their values should be used as-is without further escaping. + - **rootfs** *object*, REQUIRED The rootfs key references the layer content addresses used by the image. diff --git a/schema/config-schema.json b/schema/config-schema.json index 15bccd04e..208069717 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -83,6 +83,9 @@ }, "StopSignal": { "type": "string" + }, + "ArgsEscaped": { + "type": "boolean" } } }, diff --git a/specs-go/v1/config.go b/specs-go/v1/config.go index fe799bd69..645717260 100644 --- a/specs-go/v1/config.go +++ b/specs-go/v1/config.go @@ -48,6 +48,10 @@ type ImageConfig struct { // StopSignal contains the system call signal that will be sent to the container to exit. StopSignal string `json:"StopSignal,omitempty"` + + // ArgsEscaped is used for Windows images to indicate that the Entrypoint and Cmd have already been escaped and should be + // used directly as the command line. + ArgsEscaped bool `json:"ArgsEscaped,omitempty"` } // RootFS describes a layer content addresses