Skip to content

Commit 2037dfa

Browse files
authored
Apply suggestions from code review
1 parent 2572742 commit 2037dfa

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/modules/docker_compose.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Benefits
44

5-
Similar to generic container support, it's also possible to run a bespoke set of services specified in a `docker-compose.yml` file.
5+
Similar to generic container support, it's also possible to run a bespoke set of services specified in a
6+
`docker-compose.yml` file.
67

78
This is especially useful for projects where Docker Compose is already used in development
89
or other environments to define services that an application may be dependent upon.
@@ -34,12 +35,12 @@ services:
3435
Note that it is not necessary to define ports to be exposed in the YAML file,
3536
as this would inhibit the reuse/inclusion of the file in other contexts.
3637
37-
Instead, Testcontainers will spin up a small 'ambassador' container,
38+
Instead, Testcontainers will spin up a small `ambassador` container,
3839
which will proxy between the Compose-managed containers and ports that are accessible to our tests.
3940

4041
## ComposeContainer vs DockerComposeContainer
4142

42-
So far, we discussed `ComposeContainer`, which is the equivalent of docker compose [version 2](https://www.docker.com/blog/announcing-compose-v2-general-availability/).
43+
So far, we discussed `ComposeContainer`, which supports docker compose [version 2](https://www.docker.com/blog/announcing-compose-v2-general-availability/).
4344

4445
On the other hand, `DockerComposeContainer` utilizes Compose V1, which has been marked deprecated by Docker.
4546

@@ -83,9 +84,7 @@ while our db service waits for a specific log message:
8384
[Wait for a custom command and a log message](../../core/src/test/java/org/testcontainers/junit/ComposeContainerWithWaitStrategies.java) inside_block:composeContainerWithCombinedWaitStrategies
8485
<!--/codeinclude-->
8586

86-
!!! More on Wait Strategies
8787

88-
Refer to the documentation to learn how to use the API to create tailor-made strategies for [waiting until containers are fully started and ready](../features/startup_and_waits.md).
8988

9089
## The 'Local Compose' Mode
9190

@@ -113,12 +112,11 @@ We can use file and directory references.
113112
They are always resolved relative to the directory where the compose file resides.
114113

115114
!!! note
116-
117115
This can be used with `DockerComposeContainer` and `ComposeContainer`, but **only in the containerized Compose (not with `Local Compose` mode)**.
118116

119117
## Using private repositories in Docker compose
120-
When Docker Compose is used in container mode (not local),
121-
it needs to be made aware of Docker settings for private repositories.
118+
When Docker Compose is used in container mode (not local), it needs to be made aware of Docker
119+
settings for private repositories.
122120
By default, those setting are located in `$HOME/.docker/config.json`.
123121

124122
There are 3 ways to specify location of the `config.json` for Docker Compose:

0 commit comments

Comments
 (0)