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

Enable memory, cpu, and other limits on the container #239

Open
tfoote opened this issue Jun 23, 2023 · 4 comments
Open

Enable memory, cpu, and other limits on the container #239

tfoote opened this issue Jun 23, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@tfoote
Copy link
Collaborator

tfoote commented Jun 23, 2023

Docker allows the restriction of memory allocation from inside the container. This is valuable to make sure that containers don't potentially overflow a host's memory.

https://docs.docker.com/config/containers/resource_constraints/

@tfoote tfoote added the enhancement New feature or request label Jun 23, 2023
@Yongbeom-Kim
Copy link

Hey @tfoote thanks for maintaining rocker, mind if i work on this?

@tfoote
Copy link
Collaborator Author

tfoote commented Aug 10, 2023

You're welcome. I'm happy to take contributions. If you have a good idea of how to implement this you can go ahead though I'd recommend a sketch of your approach first, or I'd be happy to talk with you about the best approach before you start an implementation.

@Yongbeom-Kim
Copy link

Sounds good,

The implementation sounds pretty simple at a technical level - entails essentially 'forwarding' the 10-or-so flags for docker run?

Can't say I'm super thrilled about writing N RockerExtension classes that basically do the same thing. I'm thinking a metaclass or a function to dynamically create these class instances would be perfect - your thoughts?

@tfoote
Copy link
Collaborator Author

tfoote commented Aug 14, 2023

One plugin can offer different command line options. I think that a single plugin that implements the different capacity based arguments would make sense. As long as the underlying dependencies and requirements are the same if you can share code resources that's better. I think the primary thing will be the availability of cgroups support which will likely be a shared dependency and validation check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants