Skip to content

Bug: Cannot pass piped command into container #414

@iamkirkbater

Description

@iamkirkbater

Given a command similar to the following, ocm-container does not correctly handle this:

ocm-container --ocm-url stage -e MYVAR=TEST -- 'env | grep MYVAR'
Error: crun: executable file `env | grep MYVAR` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
Error: exit status 127

If a string is passed as the command - it should be passed as the argument to bash -c.

We then need to validate this continues to work for automatic cluster login (which it might due to the different entrypoint).

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