# Point domain to docker container or service

**URL:** <https://forums.suse.com/t/point-domain-to-docker-container-or-service/323>\
**Category:** Rancher 1.x\
**Created:** [August 25, 2015, 6:36pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323 "2015-08-25T18:36:52Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dewmal\_Handapangoda](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dewmal_handapangoda/32/150_2.png) [@Dewmal\_Handapangoda](https://forums.suse.com/u/Dewmal_Handapangoda)\
**Post date:** [August 25, 2015, 6:36pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/1 "2015-08-25T18:36:52Z")

</div>

I need to point domain to container  
example -  
[app.mydomain.com](http://app.mydomain.com) — \> container - internal-ip

I there any method to do that.

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [August 25, 2015, 7:10pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/2 "2015-08-25T19:10:27Z")

</div>

@Dewmal_Handapangoda you can achieve that via Rancher External Service. Steps:

1. Create External service [app.mydomain.com](http://app.mydomain.com), specify ip=your internal-ip
2. Create regular service foo, link it to Service [app.mydomain.com](http://app.mydomain.com). Now you can resolve [app.mydomain.com](http://app.mydomain.com) internal-ip from service foo container.

---

<div class="post-metadata">

**Author:** ![Dewmal\_Handapangoda](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dewmal_handapangoda/32/150_2.png) [@Dewmal\_Handapangoda](https://forums.suse.com/u/Dewmal_Handapangoda)\
**Post date:** [August 26, 2015, 3:10am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/3 "2015-08-26T03:10:36Z")

</div>

thanks,  
And how should i config [app.mydomain.com](http://app.mydomain.com) dns for access docker container via that method.

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [August 26, 2015, 4:01am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/4 "2015-08-26T04:01:24Z")

</div>

Just to clarify - [app.mydomain.com](http://app.mydomain.com) is the public domain name and you want to point it to the standalone container registered in Rancher? If yes, I might have made an incorrect assumption that [app.mydomain.com](http://app.mydomain.com) is internal to Rancher, and the approach I’ve described, would work for DNS resolution inside Rancher managed network only.

There is currently no Rancher native integration with public DNS, but we are planning to add it soon:

> <https://github.com/rancher/rancher/issues/1675>
>
> Today the only way to make service - regular or load balancer - available to the public is by binding its...

To workaround this limitation today, you would just have to point [app.mydomain.com](http://app.mydomain.com) on your public DNS, to the host ip address where your container runs (assuming its ports are published to the host and accessible to public access). So the traffic flow will be: user hits [app.mydomain.com](http://app.mydomain.com), your DNS resolves it to rancher host, then on the host it will get forwarded to your container.

---

<div class="post-metadata">

**Author:** ![Dewmal\_Handapangoda](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dewmal_handapangoda/32/150_2.png) [@Dewmal\_Handapangoda](https://forums.suse.com/u/Dewmal_Handapangoda)\
**Post date:** [August 26, 2015, 4:09am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/5 "2015-08-26T04:09:03Z")

</div>

Ok thanks. i will choose another method like port forwarding until you update version with that part.

---

<div class="post-metadata">

**Author:** ![Bastien\_Vigneron](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Bastien\_Vigneron](https://forums.suse.com/u/Bastien_Vigneron)\
**Post date:** [September 10, 2015, 9:19am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/6 "2015-09-10T09:19:01Z")

</div>

Hi Alena,

To be sure I understand, right now is it no possible to find dynamically (via an a DNS lookup for example) form outside of Rancher on which host a service like a Load Balancer is available (I.E. has been deployed by Rancher) ?

---

<div class="post-metadata">

**Author:** ![ernstae](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ernstae/32/3145_2.png) [@ernstae](https://forums.suse.com/u/ernstae)\
**Post date:** [September 10, 2015, 8:10pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/7 "2015-09-10T20:10:17Z")

</div>

Our methodology is to proxy the exposed Rancher load balancer for our application via two external load balancers.

e.g.

public --\> external load balancer --\> rancher host(s) {exposed load balancer service ports} --\> containerized apps.

I would love to add multiple IP addresses on the Rancher hosts, so that I could bind specific services to these public IPs, rather than just ports on each Rancher host. That’d be a long-term goal, and I suspect there’s likely a feature request or long-term issue out there for that feature? (I haven’t checked yet)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 10, 2015, 9:03pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/8 "2015-09-10T21:03:43Z")

</div>

@Bastien_Vigneron That is correct. @ernstae There is no feature request for what you’re looking for. Do you want to open one up in [our Github repo](https://github.com/rancher/rancher/issues)?

---

<div class="post-metadata">

**Author:** ![Bastien\_Vigneron](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Bastien\_Vigneron](https://forums.suse.com/u/Bastien_Vigneron)\
**Post date:** [September 10, 2015, 9:45pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/9 "2015-09-10T21:45:07Z")

</div>

One very cool feature could be a “rancher dynamic DNS” that we could be access from one or multiples host(s) IP with standard DNS protocol.  
Then it could be easy to delegate such a “ranche zone” (in a DNS perspective, something like \*.rancherservices.mysupercompany.com) to this rancher DNS server(s) and include it in enterprise DNS system. The “rancher DNS” servers act as masters for this zone.

With a relatively low TTL (10 seconds to 5 minutes), externals services (like public load balancers) could then dynamically “discover” rancher services.

---

<div class="post-metadata">

**Author:** ![Buishi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/buishi/32/359_2.png) [@Buishi](https://forums.suse.com/u/Buishi)\
**Post date:** [October 9, 2015, 10:35pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/10 "2015-10-09T22:35:36Z")

</div>

@ernstae I’m new to rancher, can you give an example of how to do this?

---

<div class="post-metadata">

**Author:** ![ernstae](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ernstae/32/3145_2.png) [@ernstae](https://forums.suse.com/u/ernstae)\
**Post date:** [November 3, 2015, 8:33am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/11 "2015-11-03T08:33:21Z")

</div>

@Buishi - What, specifically are you looking for help doing? Sorry for not getting back to you sooner… but it’s been a busy month.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [November 3, 2015, 9:01am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/12 "2015-11-03T09:01:36Z")

</div>

Public DNS integration (starting with Route53) is coming in the next release via a catalog template of [external-dns](https://github.com/rancher/external-dns) you can deploy.

---

<div class="post-metadata">

**Author:** ![Buishi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/buishi/32/359_2.png) [@Buishi](https://forums.suse.com/u/Buishi)\
**Post date:** [November 3, 2015, 2:21pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/13 "2015-11-03T14:21:09Z")

</div>

@ernstae@vincent Thanks for the update.

---

<div class="post-metadata">

**Author:** ![ApolloDS](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/apollods/32/623_2.png) [@ApolloDS](https://forums.suse.com/u/ApolloDS)\
**Post date:** [December 15, 2015, 11:48am UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/14 "2015-12-15T11:48:00Z")

</div>

Hi all,  
Well Route53 DNS is pretty cool but there’s one big problem:  
When there’s a Private Rancher Host IP which is behind a firewall and a NAT from the Internet to the private IP is configured.  
In Route53 I only see the private Host IP’s but how can we do a dynamic integration of the DNS with the external used public IP?

Since we don’t have routeable public IPv4 networks on every site we need the config above.  
A solution could be to use IPv6 but even this is not available from every provider yet.

A mechanism to specify an external mapped IP too would be great!

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [December 15, 2015, 4:37pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/15 "2015-12-15T16:37:57Z")

</div>

@ApolloDS here is the github ticket tracking this issue:

[https://github.com/rancher/rancher/issues/2588](https://github.com/rancher/rancher/issues/2588)

---

<div class="post-metadata">

**Author:** ![ApolloDS](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/apollods/32/623_2.png) [@ApolloDS](https://forums.suse.com/u/ApolloDS)\
**Post date:** [December 16, 2015, 2:58pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/16 "2015-12-16T14:58:33Z")

</div>

Great!  
Thank you Alena.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [January 8, 2016, 5:53pm UTC](https://forums.suse.com/t/point-domain-to-docker-container-or-service/323/17 "2016-01-08T17:53:27Z")

</div>

Closed on January 8, 2016, 5:53pm UTC


