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

Expose OS platform #10

Closed
zerok opened this issue Nov 16, 2017 · 0 comments
Closed

Expose OS platform #10

zerok opened this issue Nov 16, 2017 · 0 comments

Comments

@zerok
Copy link
Owner

zerok commented Nov 16, 2017

It should be possible to differentiate between different operating systems inside a template file. My main motivation for this is that Docker for Mac cannot reliably access the host's external IP address but relies on a special hostname (docker.for.mac.localhost) which is usually mapped to 192.168.65.1.

Inside a docker-compose.yml I now want to be able to do something like this:

    extra_hosts:
      - "vault:{{ if eq .OS.Platform "darwin" }}192.168.65.1{{ else }}{{ .Network.ExternalIP }}{{ end }}"
@zerok zerok closed this as completed in 4bffd7f Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant