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

Pass a path to config.json? #1480

Closed
dpc opened this issue Jun 8, 2017 · 7 comments
Closed

Pass a path to config.json? #1480

dpc opened this issue Jun 8, 2017 · 7 comments

Comments

@dpc
Copy link

dpc commented Jun 8, 2017

I'd like to issue runc run without relying on CWD, and be able to name config.json something completely else.

Something like runc run --spec /some/path/mycontainer.json . It seems right now I can do runc run -b /mycontainer/ but the spec file will have to be /mycontainer/config.json.

Am I missing anything?

@williammartin
Copy link

Hi @dpc,

I think this would break compatibility with the runtime-spec, in particular:

config.json: contains configuration data. This REQUIRED file MUST reside in the root of the bundle directory and MUST be named config.json. See config.json for more details.

@dpc
Copy link
Author

dpc commented Jun 12, 2017

Seem to me that by using it, I am opting into something, so it's technically OK. It's not like runc suddenly stops accepting well formed runtime-spec bundle.

I don't really get that "bundle" thing BTW. It seems it contains only one file: config.json, and in that file, rootfs directory is configured (it can be any absolute path). So what's the point of having that bundle directory in the first place? If I want everything in one directory, I can just put everything in one directory. There is no reason to mandate the name of the spec file and referring to it through it's parent directory, as far as I can see.

@wking
Copy link
Contributor

wking commented Jun 12, 2017 via email

@dpc
Copy link
Author

dpc commented Jun 12, 2017

@wking Thanks. I have recursively followed the discussion through that link, and it convinced me, that the "bundle" is a higher level (image management) concept unnecessarily pulled into the lower level concept (running a container). Anyway, it's not a big deal for me, I was just wondering if I can avoid the inconvenience.

@cyphar
Copy link
Member

cyphar commented Jun 14, 2017

I've talked to a few people who have found the bundle concept frustrating. In particular, it makes creating a library around an OCI runtime more difficult (because the API is no longer just an OCI configuration, it requires having on-disk state).

However I don't see any reason why future versions of the spec might remove that restriction, and allow for bare configurations that aren't inside a bundle. I'm actually not entirely sure why bundles are necessary. In particular, if you look at LXC, their configurations don't have such a restriction.

Personally, the utility of a bundle has been useful (umoci creates bundles and stores extra data inside the bundle specific to umoci's operation) so I can see why people might like it, but it feels quite odd to mandate that particular choice of organisation inside the spec.

The main argument that I can see is the whole "relative root" case. In particular, one case I would be concerned about if we removed bundles is what should the spec say about a path like ../blah for the rootfs (noting that due to mountpoints and symlinks that the results may not be predictable for a user).

@wking
Copy link
Contributor

wking commented Jun 14, 2017 via email

@AkihiroSuda
Copy link
Member

Closing as this is not likely to happen.

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

5 participants