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

Shell command execution #11

Closed
zerok opened this issue Jan 9, 2018 · 0 comments
Closed

Shell command execution #11

zerok opened this issue Jan 9, 2018 · 0 comments

Comments

@zerok
Copy link
Owner

zerok commented Jan 9, 2018

Motivation

Docker for mac recently changed the IP address and hostname that exposes the host machine to the Docker container from 192.168.65.1 to 192.168.65.2 (docker.for.mac.host.internal). Since hardcoding such a value into the configuration is rather sub-optimal something like this should be possible:

{{ $host := .System.ShellOutput 'docker run --rm -i -t --entrypoint /bin/ash alpine:latest -c \'eval "/usr/bin/nslookup docker.for.mac.host.internal | grep \'Address 1\' | cut -d \' \' -f 3"\'' }}
@zerok zerok closed this as completed in 81bd8c5 Jan 11, 2018
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