Add ContainerOptionsBuilder::privileged() #149
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds new
ContainerOptionsBuilder
methodprivileged()
to enable running privileged docker containers. I think it should be mentioned in CHANGELOG.md. Also, this could be potentially an incompatible change, since API addition is considered an incompatible change in semver universe.The implementation is pretty straightforward, - the
privileged
field is already present inHostConfig
, so there is only a new builder option to set the field to a required value.As a side note - I have followed the precedence set by
auto_remove()
that gets a boolean argument. However, if I was to implement it from the scratch I'd choose to drop the boolean argument completely (similarly to thedocker
command line - you only mention it if you need it).Fixes #148