mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-05 22:39:36 -05:00
provider/docker: Tweak and test host_entry
This adds acceptance tests for specifying extra hosts on Docker containers. It also renames the repeating block from `hosts` to `host`, which reads more naturally in the schema when multiple instances of the block are declared.
This commit is contained in:
parent
9a27537399
commit
9806e6ea9a
1 changed files with 6 additions and 3 deletions
|
|
@ -57,7 +57,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.
|
||||
* `extra_hosts` - (Optional) See [Extra Hosts](#extra_hosts) below for details.
|
||||
* `host_entry` - (Optional) See [Extra Hosts](#extra_hosts) 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.
|
||||
|
|
@ -88,13 +88,16 @@ the following:
|
|||
<a id="extra_hosts"></a>
|
||||
## Extra Hosts
|
||||
|
||||
`extra_hosts` is a block within the configuration that can be repeated to specify
|
||||
the extra host mappings for the container. Each `extra_hosts` block supports
|
||||
`host_entry` is a block within the configuration that can be repeated to specify
|
||||
the extra host mappings for the container. Each `host_entry` block supports
|
||||
the following:
|
||||
|
||||
* `host` - (Required, int) Hostname to add.
|
||||
* `ip` - (Required, int) IP address this hostname should resolve to..
|
||||
|
||||
This is equivalent to using the `--add-host` option when using the `run`
|
||||
command of the Docker CLI.
|
||||
|
||||
<a id="volumes"></a>
|
||||
## Volumes
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue