8

I'm trying to understand how I would set up a Docker container (running in Swarm mode) with publicly available IPv6.

I know Docker Swarm uses mesh routing, but I don't quite understand how I can dynamically assign DNS names to addresses.

As an example, let's say I want to run a Git server (with HTTP 80 443 and SSH 22) on git.example.com and a regular web server at example.com (with HTTP 80 443). Both have public IPv6 addresses, but I don't want to hard-code the IPv6 address (for example at CloudFlare). After all, this is DevOps!

How would I go about doing this? I assume I need to run my own DNS server for this.

Note: After doing some more research, it seems this is possible with the Docker HTTP Routing Mesh (HRM) which is unfortunately only part of the Enterprise Edition. Does anyone know a similar, open-source approach to this?

0

1 Answer 1

3

Assuming that "publicly available" is on the public internet it will be difficult.

DNS isn't really that reactive to changes and is challenging to run in a secure fashion on the public internet.

It also depends on what protocol you are running, because of an oddity around SRV records where pre-existing protocols were excluded from supporting it in the RFC.

But in general the public and the private solution I would implement are similar with an additional layer for a public internet solution. (assuming no use of a 3rd party or geo specific answers)

On the internet edge use Unbound DNS server on the edge, and have it relay queries to consul which would handle service registration.

If this is for private usage this would allow for some data-center awareness and fail-over.

If it is just for internal use you can just use consul and either configure your internal DNS servers to delegate subdomains or forward to the default domain.

1
  • Direct DNS changes could be problematic if you're making AAAA record updates at a rapid rate (faster than cache expiring or a zone transfer from a private BIND to public NS server). What's the expected DNS update frequency?
    – Chase
    Commented Jun 26, 2017 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.