Merge pull request #2227 from juls/docker-privileged-option
provider/docker: Add privileged option
This commit is contained in:
commit
058e174c4d
|
@ -136,6 +136,12 @@ func resourceDockerContainer() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"privileged": &schema.Schema{
|
||||||
|
Type: schema.TypeBool,
|
||||||
|
Optional: true,
|
||||||
|
ForceNew: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ func resourceDockerContainerCreate(d *schema.ResourceData, meta interface{}) err
|
||||||
d.SetId(retContainer.ID)
|
d.SetId(retContainer.ID)
|
||||||
|
|
||||||
hostConfig := &dc.HostConfig{
|
hostConfig := &dc.HostConfig{
|
||||||
|
Privileged: d.Get("privileged").(bool),
|
||||||
PublishAllPorts: d.Get("publish_all_ports").(bool),
|
PublishAllPorts: d.Get("publish_all_ports").(bool),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ The following arguments are supported:
|
||||||
kept running. If false, then as long as the container exists, Terraform
|
kept running. If false, then as long as the container exists, Terraform
|
||||||
assumes it is successful.
|
assumes it is successful.
|
||||||
* `ports` - (Optional) See [Ports](#ports) below for details.
|
* `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.
|
* `publish_all_ports` - (Optional, bool) Publish all ports of the container.
|
||||||
* `volumes` - (Optional) See [Volumes](#volumes) below for details.
|
* `volumes` - (Optional) See [Volumes](#volumes) below for details.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue