Skip to content

Hostprocess (jobcontainers) containers cmd parsing fails #1128

@jsturtevant

Description

@jsturtevant

I found using the CONTAINER_SANDBOX_MOUNT_POINT when cmd is the default shell doesn't work

I am adding a test that uses agnhost which hard codes its entry point to /agnhost (without an exe): https://github.com/kubernetes/kubernetes/blob/d64e91878517b1208a0bce7e2b7944645ace8ede/test/images/agnhost/Dockerfile_windows#L78

Since its hard coded I wanted to use the env to call the command but ended up with

image: jsturtevant/agnhost:2.33-1
command:
- "%CONTAINER_SANDBOX_MOUNT_POINT%\\agnhost"
- pause
 Error: failed to start containerd task "test": failed to start host process: exec: "C:\\C\\test\\agnhost": file does not exist: unknown

full yaml file: https://gist.github.com/jsturtevant/bf055cdd04cd93a9b62932a787ae5c77#file-doesnotwork-yaml

I was able to work around this by using start-process in the interm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions