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

Automate the addition of dns-records to hosts file #20

Open
febbraro opened this issue Mar 9, 2017 · 3 comments
Open

Automate the addition of dns-records to hosts file #20

febbraro opened this issue Mar 9, 2017 · 3 comments

Comments

@febbraro
Copy link
Member

febbraro commented Mar 9, 2017

Outrigger DNS has a number of cases where it will not work:

  • DNS resolution is not supported on Windows
  • DNS resolution is not supported on MacOS when offline (on the airplane, say)
  • Local networking is in some kind of temporary error state.

As a workaround for these issues, we'd like to support easy management of the local hosts file.

rig dns-records --install (or perhaps --save) should inject the output of that command to /etc/hosts and the Windows equivalent.

HELP WANTED
This issue is a great opportunity to learn Golang, the contribution workflow of rig, and incidentally improve rig!

Notes

  • Given the hosts entries will go stale as containers are removed and started, these entries cannot be permanent. Should there also be a cleanup command? Should rig stop run it?
  • How will this interact with VPNs?
  • Users guided to use this command will need guidance about what's happening and how to review it, seems like we'll need some INFO logging to explain.

Testing

  • Use docker-compose run --rm lint to apply the full suite of static analysis tools. If there is a failure, you aren't done yet!
  • Use docker-compose run --rm compile to confirm your code compiles.
  • You can use the binary resulting from the compilation step (located in ./build/darwin/rig) to test that you can install records and then see how curl/browser finds your containers. You can quickly spin up a container to test with docker run --rm -l com.dnsdock.image=outrigger -l com.dnsdock.name=test outrigger/apache-php:php70
@febbraro
Copy link
Member Author

febbraro commented Mar 9, 2017

Possibly just add a "--save" or "--remove" to the command to help manage it?

@grayside
Copy link
Contributor

grayside commented Aug 16, 2017

EDIT: Rolled up the relevant parts of this comment into a summary rewrite for new contributors.

@dnmurray
Copy link
Contributor

unix only, so far: #172

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

3 participants