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

Process.Init = true for the first process #1957

Open
tmahesh opened this issue Jan 8, 2019 · 2 comments
Open

Process.Init = true for the first process #1957

tmahesh opened this issue Jan 8, 2019 · 2 comments

Comments

@tmahesh
Copy link

tmahesh commented Jan 8, 2019

I had to read the source code to debug why the process i start via container.Start() was not contained into the configured name spaces.

Is it expected that the first Process launched in the container have Init set to true?
If so, i can raise a PR on README.md to save others from having to read nsenter.c ;)

@cyphar
Copy link
Member

cyphar commented Jan 8, 2019

Probably, yes (and feel free to send a PR).

However, we really don't recommend using libcontainer directly to actually start containers -- there are a lot of weird behaviours we have due to historical baggage (like using a modified version of os.Process). runc is actually (in theory) OCI-compliant and thus doesn't depend on the super messy internal libcontainer/config.Config awfulness.

tmahesh added a commit to tmahesh/runc that referenced this issue Jan 9, 2019
The first process launched in the container should set Init flag to true.
otherwise the process won't be contained to configured namespace
@tmahesh
Copy link
Author

tmahesh commented Jan 9, 2019

pull req: 1958

@cyphar at hackerrank we execute user submitted code.
We are upgrading our platform to use namespaces, cgroups features of the kernel for isolation and use oci image spec to scale for ~40 odd language runtimes we support.

runc is a cli app and we prefer a project with language bindings to create the containerised language runtimes. Can you point to other projects with libcontainer kind of api we should explore?

thx for all ur work on rootless containers, btw. It was a pleasure to read ur code.

tmahesh added a commit to tmahesh/runc that referenced this issue Jan 9, 2019
The first process launched in the container should set Init flag to true.
otherwise the process won't be contained to configured namespace

Signed-off-by: Mahesh Tiyyagura <[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

2 participants