Open rnorth opened 6 years ago
I'm really looking forward to removing the ambassador container, I believe this will make things a lot easier in more complex CI environments.
AFAIK the only thing missing now is the documentation update?
I'd very much appreciate some docs around networks :)
@felixbarny Yep you are right, PR appreciated :smile_cat:
@felixbarny yes, the docs are missing and I feel sorry about it (since I was the one who implemented the networks support)
However, it is as simple as .withNetwork(networkInstance)
and until it is implemented you an check existing usages in tests, i.e. Kafka:
https://github.com/testcontainers/testcontainers-java/blob/b5181f784c63b91a61ec68cd58acc522ce4d2dbc/modules/kafka/src/test/java/org/testcontainers/containers/KafkaContainerTest.java#L52-L69
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.
This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.
Reopening - docs still needed
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.
@rnorth given https://www.testcontainers.org/features/networking/#advanced-networking, should we close the issue now? :)
Hi there, Sometimes it is not possible to add network to container as it managed with third party libs, so add-link is the single solution
if it is built with GenericContainer similar to the Testcontainers modules then you should have access to withNetwork. Can you elaborate @sunmeplz , please?
Hi @eddumelendez ! My case: I'm using quarkus framework which provide dev services based on test containers(https://github.com/quarkusio/quarkus/blob/main/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java). When you run application in dev or test mode, quarkus run the container. My goal is to create additional service which will use existing container(kafka and db in my case). So I can't access testcontainer instance, just can find already running container using plain docker api
Hi, the task "Modify Docker Compose support; can we remove use of the ambassador container now?" that is listed as completed in the description is unfortunately blocking https://github.com/testcontainers/testcontainers-java/issues/5351 , please see comment https://github.com/testcontainers/testcontainers-java/issues/5351#issuecomment-1838847583 there for details.
Are there any plans to replace the deprecated call to SocatContainer.addLink()
in ComposeDelegate.withExposedService(String, int, WaitStrategy)
with network API calls, as Testcontainer's own Javadoc suggests? https://javadoc.io/doc/org.testcontainers/testcontainers/latest/index.html :
@Deprecated public void addLink(LinkableContainer otherContainer, java.lang.String alias) Deprecated. Links are deprecated (see #465). Please use Network features instead. Description copied from interface: Container Add a link to another container.
Thanks for collecting the references @jfrantzius. I am not sure why the compose task in the original post in this issue is marked as done, since it is not yet done. I think it makes much sense to re-visist this, ideally with a non-breaking change that provides better compatibility within the ecosystem.
That being said, there aren't concrete plans to tackle this yet (although AFAIK @eddumelendez did a spike on this in the past).
As discussed in #463, docker networks seem mature enough to use, and links are officially not recommended any more.
We'd like to deprecate use of links; off the top of my head I believe we ought to do the following things:
addLink
method as deprecated with a clear comment