testcontainers / testcontainers/testcontainers-java
Expose Network used by docker-compose
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
I have a number of containers that I need to spin up to do a system test. I need to add another container which is external to the docker-compose file, and this needs to connect to the network thats already in use.
I can't get the network from the DockerComposeContainer. Nor can I access the ambassadorContainer as it is private. Neither is there a way to "add" the extra container into the DockerComposeContainer. I need one of these two options!
As the GenericContainer allows me to call getNetwork(), I propose we add the same to the DockerComposeContainer.
Could I have some feedback before I head off to implement the change?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DockerComposeContainer and compare its accessible container and network APIs with GenericContainer.getNetwork(). Determine how the compose-managed network can be exposed for an external container, then verify that the resulting public API supports the use case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100