Since Docker essentially compartmentalizes a set of resources and then makes them available to the server that the container is running, you need to set up the DNS to point to the host server that is running Docker.
For example, in the diagram below:
The server example.com is running four docker containers running on ports 5678, 1234, 2345, and 3456. From anyone coming into the server hosting these containers, they are completely unaware that these services are running in containers. From their perspective, they appear to be running natively on the example.com server.
For someone to access these services remotely, they would make a request to the host computer using the specified port (e.g. example.com:5678).
So, when you are setting up an external DNS to make your services available to others on the internet, your DNS settings need to point to the host system IP so that others can get access to these exposed services.
Now, this is a very simplified example and things can get very complicated when you start adding in firewalls, routing, NAT, and internal or secondary DNS. But, if you keep in mind that the DNS your internet facing users are accessing to get to your services has to be accessible to them (i.e. How can they get to your internal DNS if they are external users?), you should have no trouble remembering where to set up the records.