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

Add Support for hosts in the port bindings section #820

Closed
frank-dspeed opened this issue Jan 10, 2015 · 1 comment
Closed

Add Support for hosts in the port bindings section #820

frank-dspeed opened this issue Jan 10, 2015 · 1 comment

Comments

@frank-dspeed
Copy link

ports:

  • host.box:10090:80

don't works because docker only accepts ips fig could dns request ports befor that and then supply the dns result to docker that would enable the users to deploy one fig.yml that will always bind to the right ip on the host.

@dnephin
Copy link

dnephin commented Sep 28, 2015

I think this is outside the scope of what compose should handle, however with environment variable interpolation (coming in 1.5.0), you'll be able to use a variable:

ports:
  - $HOST_IP:10090:80

That way you can do whatever you need to on the host to query for the correct ip, and have it injected into the docker-compose.yml using an environment variable.

HOST_IP=$(...) docker-compose up

@dnephin dnephin closed this as completed Sep 28, 2015
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