Skip to content

Commit 4c96872

Browse files
committed
config
1 parent 570ce63 commit 4c96872

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/features/configuration.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Custom configuration
1+
# Custom Configuration
22

3-
You can override some default properties if your environment requires that.
3+
You can override some default properties if your environment requires it.
44

5-
## Configuration locations
5+
## Configuration Locations
66

77
The configuration will be loaded from multiple locations. Properties are considered in the following order:
88

99
1. Environment variables
10-
2. `.testcontainers.properties` in user's home folder. Example locations:
10+
2. `.testcontainers.properties` in the user's home folder. Example locations:
1111
**Linux:** `/home/myuser/.testcontainers.properties`
1212
**Windows:** `C:/Users/myuser/.testcontainers.properties`
1313
**macOS:** `/Users/myuser/.testcontainers.properties`
1414

15-
Note that when using environment variables, configuration property names should be set in upper case with underscore separators, preceded by `TESTCONTAINERS_` - e.g. `ryuk.disabled` becomes `TESTCONTAINERS_RYUK_DISABLED`.
15+
Note that when using environment variables, configuration property names should be set in uppercase with underscore separators, preceded by `TESTCONTAINERS_` - e.g. `ryuk.disabled` becomes `TESTCONTAINERS_RYUK_DISABLED`.
1616

17-
### Supported properties
17+
### Supported Properties
1818

1919
Testcontainers-Python provides a configuration class to represent the settings:
2020

@@ -57,7 +57,7 @@ Additional configuration options:
5757
| `TC_POOLING_INTERVAL` | Time between connection attempts | 1 |
5858
| `DOCKER_AUTH_CONFIG` | Docker authentication config (experimental) | - |
5959

60-
## Docker host detection
60+
## Docker Host Detection
6161

6262
Testcontainers-Python will attempt to detect the Docker environment and configure everything to work automatically.
6363

@@ -74,7 +74,7 @@ However, sometimes customization is required. Testcontainers-Python will respect
7474

7575
5. Read the **docker.host** property in the `~/.testcontainers.properties` file. E.g. `docker.host=tcp://my.docker.host:1234`
7676

77-
6. Read the rootless Docker socket path, checking in the following alternative locations:
77+
6. Read the rootless Docker socket path, checking the following alternative locations:
7878

7979
1. `${XDG_RUNTIME_DIR}/.docker/run/docker.sock`
8080
2. `${HOME}/.docker/run/docker.sock`
@@ -83,7 +83,7 @@ However, sometimes customization is required. Testcontainers-Python will respect
8383

8484
7. The library will raise a `DockerHostError` if none of the above are set, meaning that the Docker host was not detected.
8585

86-
## Docker socket path detection
86+
## Docker Socket Path Detection
8787

8888
Testcontainers-Python will attempt to detect the Docker socket path and configure everything to work automatically.
8989

@@ -92,13 +92,13 @@ However, sometimes customization is required. Testcontainers-Python will respect
9292
1. Read the **TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE** environment variable. Path to Docker's socket. Used by Ryuk, Docker Compose, and a few other containers that need to perform Docker actions.
9393
Example: `/var/run/docker-alt.sock`
9494

95-
2. If the Operating System retrieved by the Docker client is "Docker Desktop", and the host is running on Windows, it will return the `//var/run/docker.sock` UNC Path. Else return the default docker socket path for rootless docker.
95+
2. If the operating system retrieved by the Docker client is "Docker Desktop", and the host is running on Windows, it will return the `//var/run/docker.sock` UNC path. Otherwise, it returns the default Docker socket path for rootless Docker.
9696

97-
3. Get the current Docker Host from the existing strategies: see Docker host detection.
97+
3. Get the current Docker host from the existing strategies: see Docker host detection.
9898

9999
4. If the socket contains the unix schema, the schema is removed (e.g. `unix:///var/run/docker.sock` -> `/var/run/docker.sock`)
100100

101-
5. Else, the default location of the docker socket is used: `/var/run/docker.sock`
101+
5. Otherwise, the default location of the Docker socket is used: `/var/run/docker.sock`
102102

103103
The library will raise a `DockerHostError` if the Docker host cannot be discovered.
104104

@@ -112,7 +112,7 @@ Testcontainers-Python supports different connection modes that determine how con
112112

113113
You can set the connection mode using the `TESTCONTAINERS_CONNECTION_MODE` environment variable or the `connection.mode` property in `.testcontainers.properties`.
114114

115-
## Example configuration file
115+
## Example Configuration File
116116

117117
Here's an example of a `.testcontainers.properties` file:
118118

@@ -133,7 +133,7 @@ tc.host=tcp://my.testcontainers.host:1234
133133
connection.mode=bridge_ip
134134
```
135135

136-
## Using configuration in code
136+
## Using Configuration in Code
137137

138138
You can access and modify the configuration programmatically:
139139

@@ -148,7 +148,7 @@ sleep_time = testcontainers_config.sleep_time
148148
# Changes should be made through environment variables or .testcontainers.properties
149149
```
150150

151-
## Best practices
151+
## Best Practices
152152

153153
1. Use environment variables for CI/CD environments
154154
2. Use `.testcontainers.properties` for local development

0 commit comments

Comments
 (0)