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

Is it safe to run isolate as a service in a Docker container? #35

Closed
fushar opened this issue Sep 27, 2017 · 5 comments
Closed

Is it safe to run isolate as a service in a Docker container? #35

fushar opened this issue Sep 27, 2017 · 5 comments

Comments

@fushar
Copy link
Member

fushar commented Sep 27, 2017

Or is there any known kernel issues that could potentially arise?

@hermanzdosilovic
Copy link
Contributor

I am running my api and ide over a year in Docker with isolate and haven't had any problems with it. You should just give your container --priviledged flag because isolate needs to be able to create cgroups.

@fushar
Copy link
Member Author

fushar commented Oct 23, 2017

Cool, thank you! Closing.

@CristianCantoro
Copy link

CristianCantoro commented May 7, 2023

If somebody needs this, the situation has changed during the last few years.

As of today (May 2023), you will need to add the following kernel command line options:

cgroup_enable=memory 
systemd.unified_cgroup_hierarchy=0

I have posted more details on StackOverflow "Unable to mount memory cgroup".

Note that this also solves errors such as:

  • Missing file or directory inside the cgroup tree (e.g. /sys/fs/cgroup/memory/ or /sys/fs/cgroup/cpuacct/), or
  • Failed to reset control group /sys/fs/cgroup/memory/...: Device or resource busy.

Note that, as said by @hermanzdosilovic, you will still need to run your container with the --priviledged flag.

@gollux
Copy link
Member

gollux commented May 7, 2023

You can try experimental code in the cg2 branch, which works with Cgroup 2.

@CristianCantoro
Copy link

@gollux wrote:

You can try experimental code in the cg2 branch, which works with Cgroup 2.

Thanks, I will check it out.

It took me a while to understand that the issue was caused by cgroup v2 versus v1, so I just found out about #78 now.

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

4 participants