-
Notifications
You must be signed in to change notification settings - Fork 557
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
Container manipulated via multiple commands #226
Comments
On Tue, Oct 13, 2015 at 11:24:05AM -0700, Doug Davis wrote:
+1 towards separating create and run a much as possible, but I don't
More notes on how you could set this up in 1. |
On Tue, Oct 13, 2015 at 11:32:16AM -0700, W. Trevor King wrote:
I wrote a wrapper 1 around ccon 2 that does this (example in 3), manage-cgroups setupccon-ced create --id abcfor CONFIG in exec-*.json; do ccon-ced exec --id abc --config "$CONFIG"; doneoci-snapshot --id abcccon-ced delete --id abcmanage-cgroups deleteto handle things like cgroup manipulation, bundle snapshot creation, If we want to enable this sort of functionality in OCI-compliant a. An explicitly-optional “process” (for ‘create’), so we don't have Until there is a clearer opt-out mechanism for cgroups (e.g. #237), That's for all for Linux namespaces. I agree with @crosbymichael that And to collect implementation refrences here, @duglin also floated a
|
Hello Doug- I see building container images as a pipeline. There is an "in volume" The only really interesting thing that can happen in a Dockefile is this Does that make sense? Cheers, Brandon On Tue, Oct 13, 2015 at 11:24 AM Doug Davis [email protected]
|
See opencontainers/runc#465 for an alternative |
This will most likely be answered/solved by the split of create/start so we can close this. If we don't do the split then we'll reopen it. |
I was trying to think about how I would go about creating an image builder program using runc/OCI. I was envisioning something similar to Docker's builder/Dockerfile file processing but with one key difference, I wanted the long-sought-after 'squash' feature. I wanted the process used by this builder to be:
1 - create the container
2 - perform a set of actions to manipulate the container - cp files, run commands, etc...
3 - create an OCI compliant image from the resulting container
Even outside of this "builder" use case this would seem to be a fairly trivial use case that might be useful to lots of people.
But, I'm having trouble imagining how I would do this with today's spec and runc. The issues all seem to be around the process management side of things. In particular:
In #225 (and in other places) there's the start of a discussion around splitting
create
fromstart
and I'd like to explore that some more. While I can certainly understand that in certain environments the authors of that environment might want to be very opinionated about the lifecycle of the processes in the containers (e.g. Docker goes out of its way to have the notion of a 'main' process which when it dies it kills all other processes), but as runc/OCI is a basic building block I don't see the value in requiring this view on everyone.As mentioned in #225 (comment) I'm wondering why the ops we have aren't just:
1 - create container
2 - run a cmd in a container (irrespective of whether another cmd is already running)
3 - delete a container
Then 2 can be run as many times as needed by the tooling in order to do what the end user wants.
There are ways we could still support the opinionated path if we wanted. For example, if on the create() we passed in a cmd then let it do as we do today, but if there is no cmd then we do the flow above.
The text was updated successfully, but these errors were encountered: