Add ArgsEscaped field to image config#829
Conversation
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>
|
After some internal discussion, going to look into another option for fixing this. Might re-open this in the future if that doesn't pan out. |
|
@kevpar - Can we revisit this? Were there any objections from OCI to adding ArgsEscaped to the config spec here? It doesn't seem harmful to add given that Docker (/Buildkit) support |
|
Seems with the suggestion of using this in containerd via containerd/containerd#6479 we should re-open this for consideration? |
This PR is an attempt to fix containerd/containerd#5067, which currently prevents certain Docker-built Windows images from working in containerd. See the containerd issue for full details. Brief overview below.
Docker has been relying on the unofficial
ArgsEscapedfield in the image config for several years now. It is added when a Windows image is built using a "shell form"ENTRYPOINT/CMDin the Dockerfile, and indicates that the first element of theEntrypoint/Cmdfield contains a full command line, rather than just a path to a binary.This change was made in Docker to improve support for Windows containers, given differences in how Windows and Linux handle command line args and escaping. Given that there are existing images in the world that rely on this field being set, the easiest way to address the problem appears to be simply adding
ArgsEscapedofficially to the image spec.For context, this is how
ArgsEscapedis represented in Docker's image config type: https://github.com/moby/moby/blob/46cdcd206c56172b95ba5c77b827a722dab426c5/api/types/container/config.go#L57