Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Allow adding or dropping Docker capabilities #80

Closed
ineffyble opened this issue Apr 13, 2019 · 2 comments
Closed

Allow adding or dropping Docker capabilities #80

ineffyble opened this issue Apr 13, 2019 · 2 comments

Comments

@ineffyble
Copy link
Contributor

The container spec should allow specifying Docker capabilities. See docker-compose documentation for an example implementation.

This functionality would be useful:

A) When wanting to tighten security, by allowing the user to drop unused capabilities

B) When needing to run a Docker container/task with extra capabilities (for example, adding SYS_MODULE to enable something in a container to load a kernel module)

I would suggest the privileged flag should also be part of this flag. This enables a range of extra privileges on a container, and is used for things like accessing host devices.

@charleskorn
Copy link
Collaborator

Great minds think alike... I added this to the roadmap on Friday, and I nearly have a change ready to go to add support for --privileged. The capabilities stuff shouldn't be too hard to add either.

charleskorn added a commit that referenced this issue Apr 14, 2019
This is required for some images such as the docker:dind image.

See also #80.
charleskorn added a commit that referenced this issue Apr 25, 2019
This allows users to selectively add capabilities rather than grant
access to everything with 'privileged'.

See also #80.
@charleskorn
Copy link
Collaborator

--privileged was added as part of v0.29 and adding and dropping capabilities will be part of v0.31, which should be out in the next few days.

Thanks again for all your feedback @ineffyble!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants