-
Notifications
You must be signed in to change notification settings - Fork 142
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
Allow port forwarding for udp ports #234
Comments
Hi @kunerd ! I am happy to support this feature! Minimizing breaking changes is obviously nice but I wouldn't worry about it too much. The primary interface that consumers interact with is If we first deprecate that one in favor of one that takes the protocol into account somehow, consumers should have a reasonable easy way to upgrade. Feel free to making breaking changes on I am also happy to review a PoC PR that doesn't fully work yet but only outlines the idea :) Thank you for contributing! |
I think wrapping port in an Enum like below could work:
After looking up the Docker docs I realized that the |
I think for now we should be fine with no caring about specific hosts. Limiting the port to a specific host seems to be more of a feature that is used when running containers in production somewhere and hence is rather of small relevance for testcontainers. The |
Hi everyone, I will move this one forward, based on #246 work, let me know if it makes sense or any other strategy you have in mind |
Created a initial PR to grab early feedback |
I'm trying to test a DNS server I build and for this to work I need to forward
upd
ports from inside the container to my host system.The docker cli syntax to forward udp ports is
-p 5353:53/udp
. Currently, this is not possible with testcontainer, becausePort
is defined as:I'm willing to provide a PR for this, but I think we should discuss possible implementations first, because it will most probably result in a breaking change.
The text was updated successfully, but these errors were encountered: