1

hey guys I have a docker container A with a domain name attached to it on a host B with a domain name attached to it as well.....how can I access the said container A via A's domain name rather than an B's ip address or domain name from computer C on the host B's local network.

thus C -> A( via wwww.cname.url) rather than C -> B( www.bname.url:port) -> A

Kendall
  • 247
  • 2
  • 4
  • 13

1 Answers1

3

You should create an A record in the DNS for www.cname.url pointing to the IP address on host B. On B you should create a NAT that maps ports 80 and 443 to the docker instance (A).

To provide a better answer, you should provide more details. How is your docker instance setup, how many and which IP addresses are being used on host B, how has networking been setup in docker, etc etc.

Tommiie
  • 5,627
  • 2
  • 12
  • 46