|
|
|
|
@ -44,7 +44,8 @@ The following arguments are supported:
|
|
|
|
|
`["/usr/bin/myprogram"]`.
|
|
|
|
|
* `dns` - (Optional, set of strings) Set of DNS servers.
|
|
|
|
|
* `env` - (Optional, set of strings) Environmental variables to set.
|
|
|
|
|
* `labels` - (Optional) Key/value pairs to set as labels on the container.
|
|
|
|
|
* `labels` - (Optional, map of strings) Key/value pairs to set as labels on the
|
|
|
|
|
container.
|
|
|
|
|
* `links` - (Optional, set of strings) Set of links for link based
|
|
|
|
|
connectivity between containers that are running on the same host.
|
|
|
|
|
* `hostname` - (Optional, string) Hostname of the container.
|
|
|
|
|
@ -56,24 +57,26 @@ The following arguments are supported:
|
|
|
|
|
* `must_run` - (Optional, bool) If true, then the Docker container will be
|
|
|
|
|
kept running. If false, then as long as the container exists, Terraform
|
|
|
|
|
assumes it is successful.
|
|
|
|
|
* `ports` - (Optional) See [Ports](#ports) below for details.
|
|
|
|
|
* `host_entry` - (Optional) See [Extra Hosts](#extra_hosts) below for details.
|
|
|
|
|
* `ports` - (Optional, block) See [Ports](#ports) below for details.
|
|
|
|
|
* `host_entry` - (Optional, block) 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.
|
|
|
|
|
* `volumes` - (Optional, block) See [Volumes](#volumes) below for details.
|
|
|
|
|
* `memory` - (Optional, int) The memory limit for the container in MBs.
|
|
|
|
|
* `memory_swap` - (Optional, int) The total memory limit (memory + swap) for the
|
|
|
|
|
container in MBs.
|
|
|
|
|
* `cpu_shares` - (Optional, int) CPU shares (relative weight) for the container.
|
|
|
|
|
* `log_driver` - (Optional, string) The logging driver to use for the container.
|
|
|
|
|
Defaults to "json-file".
|
|
|
|
|
* `log_opts` - (Optional) Key/value pairs to use as options for the logging
|
|
|
|
|
driver.
|
|
|
|
|
* `network_mode` - (Optional) Network mode of the container.
|
|
|
|
|
* `networks` - (Optional, set of strings) Id of the networks in which the container is.
|
|
|
|
|
* `log_opts` - (Optional, map of strings) Key/value pairs to use as options for
|
|
|
|
|
the logging driver.
|
|
|
|
|
* `network_mode` - (Optional, string) Network mode of the container.
|
|
|
|
|
* `networks` - (Optional, set of strings) Id of the networks in which the
|
|
|
|
|
container is.
|
|
|
|
|
|
|
|
|
|
<a id="ports"></a>
|
|
|
|
|
## Ports
|
|
|
|
|
### Ports
|
|
|
|
|
|
|
|
|
|
`ports` is a block within the configuration that can be repeated to specify
|
|
|
|
|
the port mappings of the container. Each `ports` block supports
|
|
|
|
|
@ -86,7 +89,7 @@ the following:
|
|
|
|
|
defaults to TCP.
|
|
|
|
|
|
|
|
|
|
<a id="extra_hosts"></a>
|
|
|
|
|
## Extra Hosts
|
|
|
|
|
### Extra Hosts
|
|
|
|
|
|
|
|
|
|
`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
|
|
|
|
|
@ -99,7 +102,7 @@ This is equivalent to using the `--add-host` option when using the `run`
|
|
|
|
|
command of the Docker CLI.
|
|
|
|
|
|
|
|
|
|
<a id="volumes"></a>
|
|
|
|
|
## Volumes
|
|
|
|
|
### Volumes
|
|
|
|
|
|
|
|
|
|
`volumes` is a block within the configuration that can be repeated to specify
|
|
|
|
|
the volumes attached to a container. Each `volumes` block supports
|
|
|
|
|
@ -115,7 +118,7 @@ the following:
|
|
|
|
|
volume will be mounted.
|
|
|
|
|
* `read_only` - (Optional, bool) If true, this volume will be readonly.
|
|
|
|
|
Defaults to false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One of `from_container`, `host_path` or `volume_name` must be set.
|
|
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|