Skip to content

Commit

Permalink
Merge pull request #5 from asjustas/feature/basic-readme
Browse files Browse the repository at this point in the history
Add basic readme
  • Loading branch information
asjustas authored Feb 27, 2017
2 parents b9ed9b3 + 96ac47e commit 81c707e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,37 @@
[![GoDoc](https://godoc.org/github.com/asjustas/docker-resolver?status.png)](https://godoc.org/github.com/asjustas/docker-resolver)

A simple DNS server + `/etc/hosts` file updater used to resolve names of local Docker containers.

This app listens to docker events and automatically updates your `/etc/hosts` file to allow you easy access running containers.

Also you can configure docker daemon to use build in dns server. This can be used to communicate with other docker container

with a known port bound to the Docker bridge using domain names.

## Container Registration

`docker-resolver` uses `hostname`, `container name` and `DOMAIN_NAME`, `DNSDOCK_ALIAS` env variables to register containers.

For example, the following container would be available as:

* `container.docker`
* `container.demo`
* `container.dev`
* `container.test`
* `container.io`:

```yml
symfony:
container_name: container
hostname: container.demo
build: docker/web
volumes:
- .:/var/www/html
environment:
DNSDOCK_ALIAS: container.dev,container.test
DOMAIN_NAME: container.io
```
## Installation
```sh
Expand Down

0 comments on commit 81c707e

Please sign in to comment.