ffang commented on pull request #2524: URL: https://github.com/apache/camel-quarkus/pull/2524#issuecomment-828660991
> Another thought is that, without host networking, you may not be able to run this test properly. The LRA container needs the ability to 'call back' to the test application running on the host. You raised a very good question here which pushed me to went through a bunch docker network documents to give the answer. You must be on the linux machine so that withNetworkMode(host)(equals --network host, which means container shares the same network stack as host). However, this doesn't work on mac. Per the document here https://docs.docker.com/network/host/ ``` The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server. ``` Moreover, when "--network host" is used, the "port forwarding"(-p container_port:host_port) related configuration will be ignored, which means for developer on mac(also on windows, if there is any), can't access the lra service in the container from the host. Since we can't guarantee all developers to use linux machine, I think we need the test runnable on major OS. So I think we should use default network mode(bridge) From this test, I don't see how LRA container needs the ability to 'call back' to the test application running on the host, since it works for me now on my mac, please test it with your machine if you are on linux. If in any case we need call back from container to host, with default network mode, we can also do it(using hostname docker0 for linux and host.docker.internal for mac and windows) I think my new commit addressed all concerns we have so far, please take another look. Thanks! Freeman -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
