A port mapping without a protocol is TCP only. DNS, WireGuard, game servers and media discovery use UDP, so -p 53:53 publishes the wrong half and the service looks dead from outside.
docker run -d --name dns \
-p 53:53/tcp -p 53:53/udp \
example/dns:1.0
DNS needs both: UDP for normal queries and TCP for large answers. In Compose the same suffix works in the list:
ports:
- "53:53/tcp"
- "53:53/udp"
- "51820:51820/udp"
docker compose config shows each entry with its protocol field, which is a quick way to check that you got the UDP ones.
Testing UDP is harder than TCP, which is why this goes unnoticed. A tool like nc -zv reports nothing useful for UDP, because there is no handshake. I would test with the real client instead: dig @203.0.113.10 example.com for DNS, the game client, or wg show on the other end for WireGuard.
On many Linux desktops and servers, something already holds port 53 on the host, often systemd-resolved, so the container fails to start with an address in use error. Free the port first or publish on a specific address.
Further reading: Port publishing and mapping