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

Added support for docker options device and cap-add #276

Merged
merged 1 commit into from
Mar 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,13 @@ Attribute | Description | Type | Default
----------|-------------|------|--------
additional_host | Add a custom host-to-IP mapping (host:ip) | String, Array | nil
attach | Attach container's stdout/stderr and forward all signals to the process | TrueClass, FalseClass | nil
cap_add | Capabilities to add to container | String, Array | nil
cidfile | File to store container ID | String | nil
container_name | Name for container/service | String | nil
cookbook | Cookbook to grab any templates | String | docker
cpu_shares | CPU shares for container | Fixnum | nil
detach | Detach from container when starting | TrueClass, FalseClass | nil
device | Device(s) to pass through to container | String, Array | nil
dns | DNS servers for container | String, Array | nil
dns_search | DNS search domains for container | String, Array | nil
entrypoint | Overwrite the default entrypoint set by the image | String | nil
Expand Down
2 changes: 2 additions & 0 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,11 @@ def run
def run_cli_args
{
'add-host' => Array(new_resource.additional_host),
'cap-add' => Array(new_resource.cap_add),
'cpu-shares' => new_resource.cpu_shares,
'cidfile' => new_resource.cidfile,
'detach' => new_resource.detach,
'device' => Array(new_resource.device),
'dns' => Array(new_resource.dns),
'dns-search' => Array(new_resource.dns_search),
'env' => Array(new_resource.env),
Expand Down
2 changes: 2 additions & 0 deletions resources/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
attribute :cookbook, :kind_of => [String], :default => 'docker'
attribute :created, :kind_of => [String]
attribute :cpu_shares, :kind_of => [Fixnum]
attribute :cap_add, :kind_of => [String, Array]
attribute :destination, :kind_of => [String]
attribute :detach, :kind_of => [TrueClass, FalseClass]
attribute :device, :kind_of => [String, Array]
attribute :dns, :kind_of => [String, Array]
attribute :dns_search, :kind_of => [String, Array]
attribute :entrypoint, :kind_of => [String]
Expand Down