Open dabg3 opened 4 months ago
A property could be added to the LocalStackDevServicesBuildTimeConfig configuration
/**
* Indicates if the container would make a connection to the host network.
* {@code Testcontainers.exposeHostPorts(...)} need to be called to define the target port on the host
*/
@WithDefault("false")
boolean accessToHost();
And the container can be configured here
Would you mind propose a PR for this and test it with your requirement ?
Sure! I'll start working on it in a couple of days. Thank you for the inputs
I opened a discussion at quarkus quarkusio/quarkus#40573
I'm leveraging the Quarkus Dev Services feature to start an EventBridge instance when launching my application via
mvn quarkus:dev
. The application exposes a REST endpoint which has been set up as API destination in EventBridge, it is associated with a rule so that it gets called when a certain event passes through.So EventBridge runs in a container, the application on the host. The problem is that the localstack container has no way to reach the host network, in
/etc/hosts
there isn't ahost.docker.internal
entry. I can't find a way to pass the--add-host
flag either, it may be viable via theDOCKER_FLAGS
env variable but that cannot be specified on the quarkus extension.TestContainers allows to expose host ports to the container or to set a different network mode, is this a missing functionality of the quarkus-extension? or did I overlook something?