-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run MockServerContainer with withNetworkMode("host") #4286
Comments
I get the same error with release 1.16 when asking for a port mapped from the container. Example code:
This works well in release 1.15.3, but broke since the 1.16 release. |
@guss77 in 1.16.0, we no longer publish all ports, so your exposed port isn't published anymore and you need to publish it yourself. There is |
Testcontainers doesn't network mode There's still some discussion going around surrounding that. See #5151. The main concern atm, is that it's a platform dependent change (network mode "host" only works on linux). Though I'd like to learn more about your use-case with network mode "host"? What are you planning to use it for? |
Closing due to a decision was made in #5151. See this comment. |
Consider the following test:
The error I'm getting is:
java.lang.IllegalArgumentException: Requested port (1080) is not mapped
btw, I don't mind about the exact port from the host perspective (in my case, 3333)
It could be arbitrary
Why do I get this error?
The text was updated successfully, but these errors were encountered: