Skip to content

Commit

Permalink
Add ArgsEscaped field to image config
Browse files Browse the repository at this point in the history
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 <kevpar@microsoft.com>
Signed-off-by: Justin Terry <jlterry@amazon.com>
  • Loading branch information
kevpar authored and jterry75 committed Oct 5, 2022
1 parent 52a3f77 commit 59780aa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ 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

`[Deprecated]` - This field is present only for legacy compatibility with Docker and should not be used by new image builders.
It is used by Docker for Windows images to indicate that the `Entrypoint` or `Cmd` or both, contains only a single element array, that is a pre-escaped, and combined into a single string `CommandLine`.
If `true` the value in `Entrypoint` or `Cmd` should be used as-is to avoid double escaping.
Note, the exact behavior of `ArgsEscaped` is complex and subject to implementation details in Moby project.

- **Memory** *integer*, OPTIONAL

This property is *reserved* for use, to [maintain compatibility](media-types.md#compatibility-matrix).
Expand Down
2 changes: 2 additions & 0 deletions media-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ This section shows where the OCI Image Specification is compatible with formats
- `.config.MemorySwap`: only present in Docker, and reserved in OCI
- `.config.CpuShares`: only present in Docker, and reserved in OCI
- `.config.Healthcheck`: only present in Docker, and reserved in OCI
- [Moby/Docker](https://github.com/moby/moby)
- `.config.ArgsEscaped`: Windows-specific Moby/Docker extension, deprecated in OCI, available for compatibility with older images.

`.config.StopSignal` and `.config.Labels` are accidentally undocumented in Docker Image Spec v1.2, but these fields are not OCI-specific concepts.

Expand Down
3 changes: 3 additions & 0 deletions schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
},
"StopSignal": {
"type": "string"
},
"ArgsEscaped": {
"type": "boolean"
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions specs-go/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ type ImageConfig struct {

// StopSignal contains the system call signal that will be sent to the container to exit.
StopSignal string `json:"StopSignal,omitempty"`

// ArgsEscaped `[Deprecated]` - This field is present only for legacy
// compatibility with Docker and should not be used by new image builders.
// It is used by Docker for Windows images to indicate that the `Entrypoint`
// or `Cmd` or both, contains only a single element array, that is a
// pre-escaped, and combined into a single string `CommandLine`. If `true`
// the value in `Entrypoint` or `Cmd` should be used as-is to avoid double
// escaping.
ArgsEscaped bool `json:"ArgsEscaped,omitempty"`
}

// RootFS describes a layer content addresses
Expand Down

0 comments on commit 59780aa

Please # to comment.