You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For complicated reasons, our tests already run in a Docker container. From there, we want to use testcontainers to start a sibling container.
While this works fine, we need to connect both to the same network so that the testcontainer is reachable. Unfortunately, as far as we can see, we can only connect it to an existing network if we know the network's ID (which we don't, as it is re-created regularly).
Describe the solution you'd like
It should be possible to connect a testcontainer to a network using only the network's name.
Describe alternatives you've considered
It might be possible to use some other Docker library to find the ID of the network so that we can pass it to testcontainers. But that is a lot of work.
The text was updated successfully, but these errors were encountered:
This is not yet supported and relates to #506, #407 too. I haven't thought much about alternatives, but I think we need something similar. Maybe we can use the AbstractBuilder to provide this feature for all Docker resources.
Since we refactored and moved to the new container builder API, this is now possible. You can use WithNetwork(string) to connect to an already existing network. In addition, we extended the reuse support by implementing #1051.
Is your feature request related to a problem? Please describe.
For complicated reasons, our tests already run in a Docker container. From there, we want to use testcontainers to start a sibling container.
While this works fine, we need to connect both to the same network so that the testcontainer is reachable. Unfortunately, as far as we can see, we can only connect it to an existing network if we know the network's ID (which we don't, as it is re-created regularly).
Describe the solution you'd like
It should be possible to connect a testcontainer to a network using only the network's name.
Describe alternatives you've considered
It might be possible to use some other Docker library to find the ID of the network so that we can pass it to testcontainers. But that is a lot of work.
The text was updated successfully, but these errors were encountered: