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

Add support for adding and dropping linux capabilities to/from containers. #4060

Closed
wants to merge 1 commit into from

Conversation

albers
Copy link

@albers albers commented May 6, 2021

Creating containers with adjusted capabilities is a more secure alternative to using privileged mode.
I have a use case that forces me to use privileged mode instead of just adding one missing capability.
I feel testcontainers should support capabilities.

I placed the new code below the privileged mode pieces because they are functionally related.
In implementig, I followed #725, which added support for container labels.

Signed-off-by: Harald Albers <github@albersweb.de>
@bsideup
Copy link
Member

bsideup commented May 7, 2021

Hi @albers,

This looks like a very niche functionality to me, and given that we provide withCreateContainerCmdModifier that allows applying customization to the CreateContainerCmd object, I am not sure we need to add it as a first class API.

WDYT?

@albers
Copy link
Author

albers commented May 7, 2021

@bsideup I agree. I did not find withCreateContainerCmdModifier in the docs (because I did not look for a generic solution). thanks for pointing me to it.

@albers albers closed this May 7, 2021
@albers albers deleted the capabilities branch May 7, 2021 18:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants