I was wondering if it was possible to assign the DNS server a docker container is querying (via docker run --dns, or otherwise) to be on a specific port, something other than 53? I had built a custom python based DNS server for a specific use case and don't have the option to run the container it resides in on the traditional TCP/UDP port 53 (issue with Apache MESOS Marathon unfortunately). Docker image the server is built on is python:3.6.12-slim-buster.
1 Answer
You have to bind server's port to something else when running it's container, using the --publish
or -p
flag.
Take a look at examples and documentation here.