How can I expose UDP ports with Testcontainers? #556
Unanswered
joakimbeng
asked this question in
Q&A
Replies: 1 comment
-
Hi @joakimbeng, exposing UDP ports is not currently supported. It may integrate quite nicely by adding support for a string type, something like: .withExposedPorts(8080, "8125/udp", "8081/tcp")
...
container.getMappedPort("8125/udp") PR is welcome 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With docker and docker-compose I can use the
1234/udp
syntax when exposing ports if they are UDP ports intead of TCP ports.But this is not possible with Testcontainers and I'm not able to find any previous questions about this, so I'm asking here.
I haven't taken a look at the code but as Docker already has a syntax for supporting exporting UDP ports it seems like an easy fix to make this work, or is there already some kind of workaround for this?
Beta Was this translation helpful? Give feedback.
All reactions