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

Make docker compose generated runtime name available inside the container #2533

Closed
jasw opened this issue Dec 10, 2015 · 2 comments
Closed

Comments

@jasw
Copy link

jasw commented Dec 10, 2015

Hi all,

My usecase requires the running app aware of the docker instance name, so that it can push performance metrics to a Elastic Search index with the right container name.

For example, if I scale my "web" tier compose to 3, compose would generate some names like web-myapp-01, 02, 03. I am hoping there is a way for me to access the name from within the web app so that each app could create a new elastic search index like web.metrics.web-myapp-01.xxx.

I have done a few searches and readings, there seems to be no easy way of doing this.

The 1st idea pops in mind is a feature request for docker-compose to add the name parameter as a runtime environment name.

I guess similar things the people have been wanted for IP and port awareness which we now use service registration and discovery to solve can be done the same way.

Please let me know if thats a sensible feature request. If you have a good workaround, I am all ears.

Thank you!

Jason W

@dnephin
Copy link

dnephin commented Dec 10, 2015

Duplicate of #1503, there is some discussion in that issue.

@jasw
Copy link
Author

jasw commented Dec 10, 2015

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants