HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

Point docker container DNS to specific port?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
containerpointdockerdnsportspecific

Problem

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.

Solution

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.

Context

StackExchange DevOps Q#14677, answer score: 1

Revisions (0)

No revisions yet.