Docker Community Forums

Share and learn in the Docker community.

Add a CNAME to a service in embedded DNS server

I’ve tried setting the --hostname flag in the hopes that it would create a DNS CNAME for the service but that didn’t work. I would be willing to change the container name but it can’t take an FQDN… Is there a way to interact with the embedded DNS server to add a CNAME to a service? I could even do this through the API if I wanted since I deploy with jenkins.

the service names are only shared inside the swarm… not outside…

I’m aware. The question still stands.

Were you ever able to find a solution? I want to add a CNAME to the docker-managed DNS so I can simulate a HA failover during testing.

Hey man, no dice on this one, sorry. Moving to kubernetes too, it’s a bit terrifying at first but you can do a lot more with it.

We’re moving to K8S too. Hopefully that will solve this issue. For now, I’ll reconfigure and restart the proxy.