TestContainers: reuse network from DockerComposeContainer to use in other GenericContainer?

Viewed 482

There is a method:

org.testcontainers.containers.GenericContainer#withNetwork

which I can use to spawn containers with a same network using TestContainers lib.

But what about DockerComposeContainer, first I start it, then I want to get a network out of it and reuse the same network when I spawn following GenericContainers.

Is it even possible now?

0 Answers
Related