Skip to content

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

Closed
albers wants to merge 1 commit into
testcontainers:masterfrom
albers:capabilities
Closed

Add support for adding and dropping linux capabilities to/from containers.#4060
albers wants to merge 1 commit into
testcontainers:masterfrom
albers:capabilities

Conversation

@albers
Copy link
Copy Markdown

@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>
@albers albers requested review from bsideup, kiview and rnorth as code owners May 6, 2021 21:37
@bsideup
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants