Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding the default args parameter in the spec #645

Closed
mikebrow opened this issue Mar 14, 2016 · 3 comments
Closed

Overriding the default args parameter in the spec #645

mikebrow opened this issue Mar 14, 2016 · 3 comments

Comments

@mikebrow
Copy link
Member

With the current spec command the args parameter defaults to sh. This works well for containers that include the sh command, but not so well for other containers.

One has to edit the config.json just to run hello-world. Examples:
sed -i 's;"sh";"/hello";' config.json
sed -i 's/"sh"/"echo","-n","hi"/' config.json
edit args using a text editor.

For usability sake... I recommend we either add an optional --args parameter to the runc spec command, or the runc start command (or both) to enable overriding the default arg array; or we document using sed in the usage for the spec and start commands. I prefer adding --args parameters.

Thoughts? I'll put a PR together for it.

Cheers, Mike

@marcosnils
Copy link
Contributor

The runC readme states:

It assumes that the file-system is found in a directory called rootfs and there is a user with uid and gid of 0 defined within that file-system.

Maybe adding that it assumes that the rootfs has sh is enough?

@crosbymichael
Copy link
Member

The specs commands just creates an example config as a starting point for you to build on.

its just meant as a starting point, thats all.

@mikebrow
Copy link
Member Author

I'll update the usage for spec/start to reflect that. This to reduce the possible number of incoming reported issues and questions. Cheers.

stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 8, 2017
…mpty-limit

config.md: add empty limit for key of annotations
stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 8, 2017
This condition landed in 27a05de (Add text about extensions,
2016-06-26, opencontainers#510) with subsequent wording tweaks in 3f0440b
(config.md: add empty limit for key of annotations, Dec 28 10:35:19
2016, opencontainers#645) and 2c8feeb (config: Bring "unique... within this map"
back together, 2017-01-12, opencontainers#654).  However, since eeaccfa (glossary:
Make objects explicitly unordered and forbid duplicate names,
2016-09-27, opencontainers#584) we forbid duplicate keys on *all* objects (not just
annotations), so this PR removes the redundant annotation-specific
condition.

Signed-off-by: W. Trevor King <[email protected]>
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

No branches or pull requests

3 participants