|
2 | 2 |
|
3 | 3 | Testcontainers supports various configurations to set up your test environment. It automatically discovers the Docker environment and applies the configuration. You can set or override the default values either with the Testcontainers [properties file][properties-file-format] (`~/.testcontainers.properties`) or with environment variables. The following configurations are available: |
4 | 4 |
|
5 | | -| Properties File | Environment Variable | Description | Default | |
6 | | -|-----------------------------|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|-----------------------------| |
7 | | -| `docker.config` | `DOCKER_CONFIG` | The directory path that contains the Docker configuration (`config.json`) file. | `~/.docker/` | |
8 | | -| `docker.host` | `DOCKER_HOST` | The Docker daemon socket to connect to. | - | |
9 | | -| `docker.context` | `DOCKER_CONTEXT` | The Docker context to connect to. | - | |
10 | | -| `docker.auth.config` | `DOCKER_AUTH_CONFIG` | The Docker configuration file content (GitLab: [Use statically-defined credentials][use-statically-defined-credentials]). | - | |
11 | | -| `docker.cert.path` | `DOCKER_CERT_PATH` | The directory path that contains the client certificate (`{ca,cert,key}.pem`) files. | `~/.docker/` | |
12 | | -| `docker.tls` | `DOCKER_TLS` | Enables TLS. | `false` | |
13 | | -| `docker.tls.verify` | `DOCKER_TLS_VERIFY` | Enables TLS verify. | `false` | |
14 | | -| `host.override` | `TESTCONTAINERS_HOST_OVERRIDE` | The host that exposes Docker's ports. | - | |
15 | | -| `docker.socket.override` | `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` | The file path to the Docker daemon socket that is used by Ryuk (resource reaper). | `/var/run/docker.sock` | |
16 | | -| `ryuk.disabled` | `TESTCONTAINERS_RYUK_DISABLED` | Disables Ryuk (resource reaper). | `false` | |
17 | | -| `ryuk.container.privileged` | `TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED` | Runs Ryuk (resource reaper) in privileged mode. | `true` | |
18 | | -| `ryuk.container.image` | `TESTCONTAINERS_RYUK_CONTAINER_IMAGE` | The Ryuk (resource reaper) Docker image. | `testcontainers/ryuk:0.5.1` | |
19 | | -| `hub.image.name.prefix` | `TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX` | The name to use for substituting the Docker Hub registry part of the image name. | - | |
20 | | -| `wait.strategy.retries` | `TESTCONTAINERS_WAIT_STRATEGY_RETRIES` | The wait strategy retry count. | `infinite` | |
21 | | -| `wait.strategy.interval` | `TESTCONTAINERS_WAIT_STRATEGY_INTERVAL` | The wait strategy interval<sup>1</sup>. | `00:00:01` | |
22 | | -| `wait.strategy.timeout` | `TESTCONTAINERS_WAIT_STRATEGY_TIMEOUT` | The wait strategy timeout<sup>1</sup>. | `01:00:00` | |
| 5 | +| Properties File | Environment Variable | Description | Default | |
| 6 | +|---------------------------------|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|------------------------------| |
| 7 | +| `docker.config` | `DOCKER_CONFIG` | The directory path that contains the Docker configuration (`config.json`) file. | `~/.docker/` | |
| 8 | +| `docker.host` | `DOCKER_HOST` | The Docker daemon socket to connect to. | - | |
| 9 | +| `docker.context` | `DOCKER_CONTEXT` | The Docker context to connect to. | - | |
| 10 | +| `docker.auth.config` | `DOCKER_AUTH_CONFIG` | The Docker configuration file content (GitLab: [Use statically-defined credentials][use-statically-defined-credentials]). | - | |
| 11 | +| `docker.cert.path` | `DOCKER_CERT_PATH` | The directory path that contains the client certificate (`{ca,cert,key}.pem`) files. | `~/.docker/` | |
| 12 | +| `docker.tls` | `DOCKER_TLS` | Enables TLS. | `false` | |
| 13 | +| `docker.tls.verify` | `DOCKER_TLS_VERIFY` | Enables TLS verify. | `false` | |
| 14 | +| `host.override` | `TESTCONTAINERS_HOST_OVERRIDE` | The host that exposes Docker's ports. | - | |
| 15 | +| `docker.socket.override` | `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` | The file path to the Docker daemon socket that is used by Ryuk (resource reaper). | `/var/run/docker.sock` | |
| 16 | +| `ryuk.disabled` | `TESTCONTAINERS_RYUK_DISABLED` | Disables Ryuk (resource reaper). | `false` | |
| 17 | +| `ryuk.container.privileged` | `TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED` | Runs Ryuk (resource reaper) in privileged mode. | `true` | |
| 18 | +| `ryuk.container.image` | `TESTCONTAINERS_RYUK_CONTAINER_IMAGE` | The Ryuk (resource reaper) Docker image. | `testcontainers/ryuk:0.12.0` | |
| 19 | +| `hub.image.name.prefix` | `TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX` | The name to use for substituting the Docker Hub registry part of the image name. | - | |
| 20 | +| `wait.strategy.retries` | `TESTCONTAINERS_WAIT_STRATEGY_RETRIES` | The wait strategy retry count. | `infinite` | |
| 21 | +| `wait.strategy.interval` | `TESTCONTAINERS_WAIT_STRATEGY_INTERVAL` | The wait strategy interval<sup>1</sup>. | `00:00:01` | |
| 22 | +| `wait.strategy.timeout` | `TESTCONTAINERS_WAIT_STRATEGY_TIMEOUT` | The wait strategy timeout<sup>1</sup>. | `01:00:00` | |
| 23 | +| `named.pipe.connection.timeout` | `TESTCONTAINERS_NAMED_PIPE_CONNECTION_TIMEOUT` | The named pipe connection timeout<sup>1</sup>. | `00:00:01` | |
23 | 24 |
|
24 | 25 | 1) The value represent the string representation of a [TimeSpan](https://learn.microsoft.com/en-us/dotnet/api/system.timespan), for example, `00:00:01` for 1 second. |
25 | 26 |
|
|
0 commit comments