Merge ce8eaaf305 into 802f18af55
This commit is contained in:
commit
dc0a8e9f04
2 changed files with 10 additions and 8 deletions
14
README.md
14
README.md
|
|
@ -74,7 +74,7 @@ Creates a testcontainers instance from a given Docker label and returns them
|
|||
| `:exposed-ports` | Vector with ints, mandatory | All ports which should be exposed and mapped to a local port |
|
||||
| `:env-vars` | Map | A map with environment variables |
|
||||
| `:command` | Vector with strings | The start command of the container |
|
||||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`). For host networking, use :host |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the [wait strategy](doc/wait-strategies.md) to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the [log strategy](doc/log-strategies.md) to use, e.g. {:log-strategy string} |
|
||||
|
|
@ -129,10 +129,10 @@ Initializes a given Testcontainer, which was e.g. provided by a library
|
|||
| `:exposed-ports` | Vector with ints, mandatory | All ports which should be exposed and mapped to a local port |
|
||||
| `:env-vars` | Map | A map with environment variables |
|
||||
| `:command` | Vector with strings | The start command of the container |
|
||||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network` | Map or :host | A map containing the configuration of a Docker Network (see: `create-network`). For host networking, use :host |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the [wait strategy](doc/wait-strategies.md) to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the [log strategy](doc/log-strategies.md) to use, e.g. {:log-strategy string} |
|
||||
| `:wait-for` | Map | A map containing the [wait strategy](doc/wait-strategies.md) to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the [log strategy](doc/log-strategies.md) to use, e.g. {:log-strategy string} |
|
||||
| | | |
|
||||
|
||||
#### Result:
|
||||
|
|
@ -143,7 +143,7 @@ Initializes a given Testcontainer, which was e.g. provided by a library
|
|||
| `:exposed-ports` | Vector with ints | Value of the same input parameter |
|
||||
| `:env-vars` | Map | Value of the same input parameter |
|
||||
| `:host` | String | The host for the Docker Container |
|
||||
| `:network` | Map | The network configuration of the Container, if provided |
|
||||
| `:network` | Map or :host | The network configuration of the Container, if provided. |
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided! |
|
||||
|
||||
#### Example:
|
||||
|
|
@ -183,7 +183,7 @@ Creates a testcontainer from a Dockerfile
|
|||
| `:exposed-ports` | Vector with ints, mandatory | All ports which should be exposed and mapped to a local port |
|
||||
| `:env-vars` | Map | A map with environment variables |
|
||||
| `:command` | Vector with strings | The start command of the container |
|
||||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`). For host networking, use :host |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the [wait strategy](doc/wait-strategies.md) to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the [log strategy](doc/log-strategies.md) to use, e.g. {:log-strategy string} |
|
||||
|
|
@ -399,7 +399,7 @@ Creates a network. The optional map accepts config values for enabling ipv6 and
|
|||
| Key | Type | Description |
|
||||
| ------------- | :------------- | :----- |
|
||||
| `:ipv6` | boolean | Should the network enable IPv6? |
|
||||
| `:driver` | String | The network driver used by Docker, e.g. `bridge` or `host` |
|
||||
| `:driver` | String | The network driver used by Docker, e.g. `bridge` |
|
||||
|
||||
#### Result:
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@
|
|||
(.setCommand container ^"[Ljava.lang.String;" (into-array String command)))
|
||||
|
||||
(when network
|
||||
(.setNetwork container (:network network)))
|
||||
(if (= :host network)
|
||||
(.withNetworkMode container "host")
|
||||
(.setNetwork container (:network network))))
|
||||
|
||||
(when network-aliases
|
||||
(.setNetworkAliases container network-aliases))
|
||||
|
|
|
|||
Loading…
Reference in a new issue