Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Provide public IP and/or domain name to the container via env var #7472

Closed
capoferro opened this issue Aug 7, 2014 · 11 comments
Closed
Labels
area/runtime kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Comments

@capoferro
Copy link
Contributor

(Extracted from thread in #7421)

For apps that register themselves with service discovery (such as Eureka), containers need to know what their publicly accessible IP or domain name is in order for the contained apps to register themselves correctly.

@thaJeztah
Copy link
Member

Hm, curl http://bot.whatismyipaddress.com 😄

@capoferro
Copy link
Contributor Author

lol, "publicly" may not mean "visible from the internet" 🐹

Perhaps there is a better word for the IP address that other boxes can connect to...

@thaJeztah
Copy link
Member

I know 😀 was just kidding around.

Wasn't there a generic issue regarding an improved "introspection" API from within the container somewhere? Maybe issues like this should be collected / linked in a single "wrapper" issue

@capoferro
Copy link
Contributor Author

@thaJeztah There are some notes on introspection in these threads: #7255 and #4332.

@cpuguy83
Copy link
Member

WIP but check out: https://github.com/cpuguy83/lestrade

Unfortunately it has to be run on the host and not in the container due to issues picking up newly created containers.

@flaviostutz
Copy link

+1
I really need this for registering container services on etcd from inside the container!
For example, if I have a bunch of NodeJS containers serving my Application (with elastic resizing) and I have a bunch of NGinx containers on its front balancing requests, I would like to have NGinx instances to lookup at etcd for available NodeJS containers (along with IP:port) so that NGinx instances could automatically reconfigure themselves for added/removed NodeJS containers during operations.

@thaJeztah
Copy link
Member

@flaviostutz I wonder if that should be done by the container itself, or by a separate container, making use of docker events; ie, when a container is started, docker fires a "start" event. The separate container listens for these events and registers the container in etcd.

A nice blog post (using docker-gen), can be found here: Docker Service Discovery Using Etcd and Haproxy. If you just need to configure NGINX, also have a look at nginx-proxy

I'm not sure if those example cover your needs, but they may give you some ideas.

HTH!

@cpuguy83
Copy link
Member

cpuguy83 commented Feb 1, 2015

Or you can even have nginx use etcd as a source of routing... this would require some LUA stuff, though I wouldn't be surprised if someone has done this.
There is also hipache (and nginx-hipache) which uses redis as a backend.

@jessfraz jessfraz added Proposal kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny labels Feb 28, 2015
@vdemeester
Copy link
Member

Given the activity level on this issue, I'm going to close it as it's either fixed, a duplicate or not a request anymore. If you think I'm mistaken, feel free to discuss it there 😉

@dmick
Copy link

dmick commented Oct 25, 2018

"I don't know the status of this issue so I'll close it"

@capoferro
Copy link
Contributor Author

capoferro commented Oct 25, 2018

@dmick It's honestly reasonable to close an issue that hasn't seen activity in 3 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny
Projects
None yet
Development

No branches or pull requests

8 participants