If not explicit stated, Podman will publish a TCP port by default. To publish an UDP port, simply add the suffix /udp
to the container port part like this:
Syntax:
--publish, -p=[[ip:][hostPort]:]containerPort[/protocol]
Example:
-p 5053:5053/udp
For compose files:
ports:
- "5053:5053/udp"
Quick check:
$ ss -tupln | grep 5053
udp UNCONN 0 0 *:5053 *:* user[...]
It is enough to add the suffix to the container port.
Most recent Articles: