Skip to content

Conversation

@dcantah
Copy link
Contributor

@dcantah dcantah commented Apr 25, 2022

This adds a test to validate execs work with ArgsEscaped images. ArgsEscaped refers to a non-standard OCI image spec field
that indicates that the command line for Windows Containers should be used from args[0] without escaping. This behavior
comes into play with images that use a shell-form ENTRYPOINT or CMD in their Dockerfile. The behavior that the test is testing
is that execs work properly with these images. Hcsshim prefers the commandline field on the OCI runtime spec and will ignore
Args if this is filled in, which ArgsEscaped does. In Containerd/cri plugin the containers runtime spec is used as a base for the execs spec as well, so if commandline isn't cleared out then we'll end up launching the init process again instead of what the user requested.

This adds a test to validate execs work with ArgsEscaped images.
ArgsEscaped refers to a non-standard OCI image spec field
that indicates that the command line for Windows Containers
should be used from args[0] without escaping. This behavior
comes into play with images that use a shell-form ENTRYPOINT
or CMD in their Dockerfile. The behavior that the test is testing
is that execs work properly with these images. Hcsshim prefers
the commandline field on the OCI runtime spec and will ignore
Args if this is filled in, which ArgsEscaped does. In Containerd/cri
plugin the containers runtime spec is used as a base for the execs
spec as well, so if commandline isn't cleared out then we'll end up
launching the init process again instead of what the user requested.

Signed-off-by: Daniel Canter <[email protected]>
@dcantah dcantah requested a review from a team as a code owner April 25, 2022 20:53
@dcantah dcantah merged commit 544a27d into microsoft:master Apr 27, 2022
anmaxvl added a commit that referenced this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants