Skip to content

Commit

Permalink
Merge pull request #2227 from juls/docker-privileged-option
Browse files Browse the repository at this point in the history
provider/docker: Add privileged option
  • Loading branch information
mitchellh committed Jun 4, 2015
2 parents 01f101f + b9a4376 commit 058e174
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin/providers/docker/resource_docker_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ func resourceDockerContainer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},

"privileged": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
},
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func resourceDockerContainerCreate(d *schema.ResourceData, meta interface{}) err
d.SetId(retContainer.ID)

hostConfig := &dc.HostConfig{
Privileged: d.Get("privileged").(bool),
PublishAllPorts: d.Get("publish_all_ports").(bool),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The following arguments are supported:
kept running. If false, then as long as the container exists, Terraform
assumes it is successful.
* `ports` - (Optional) See [Ports](#ports) below for details.
* `privileged` - (Optional, bool) Run container in privileged mode.
* `publish_all_ports` - (Optional, bool) Publish all ports of the container.
* `volumes` - (Optional) See [Volumes](#volumes) below for details.

Expand Down

0 comments on commit 058e174

Please sign in to comment.