How do I forward a UDP port from my Docker container to the host machine?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
Use the -p flag and add
/udp
suffix to the port number.-p 53160:53160/udp
Full command
If you're running boot2docker on Mac, be sure to forward the same ports on boot2docker to your local machine.
You can also EXPOSE a port in a
Dockerfile
:Here is a link with more Docker Networking info covered in the container docs: https://docs.docker.com/config/containers/container-networking/ (Courtesy of Old Pro in the comments)