Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelsbradleyjr/docker-dns-local
Docker DNS Local
https://github.com/michaelsbradleyjr/docker-dns-local
Last synced: about 1 month ago
JSON representation
Docker DNS Local
- Host: GitHub
- URL: https://github.com/michaelsbradleyjr/docker-dns-local
- Owner: michaelsbradleyjr
- License: mit
- Created: 2015-09-08T02:32:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-10T20:05:06.000Z (over 9 years ago)
- Last Synced: 2024-10-16T11:26:32.589Z (3 months ago)
- Language: Shell
- Size: 137 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker DNS Local
## `run.sh`
`./run.sh container-name someSecretPassword`
For a clean run first do: `rm -rf bind-data/*`
### Docker host IP
Find it with: `docker-machine ip $(docker-machine active)`
Place it in the `DNS Servers` configuration of the machine being used for development work, e.g. a mac laptop which is running local Docker hosts via `docker-machine`.
## webmin
`open http://192..:10000`
Login: root
-> Servers
-> BIND DNS Server### Forwarding and Transfers
Servers to forward queries to
`8.8.8.8`, `8.8.4.4`
#### Edit Config File
##### /etc/bind/named.conf
*--no changes--*
##### /etc/bind/named.conf.options
```
options {...
allow-query { any; };
allow-query-cache { any; };
allow-recursion { any; };
};
```##### /etc/bind/named.conf.local
*--no changes--*
##### /etc/bind/named.conf.default-zones
*--no changes--*
### Create master zone
**Zone type:** *Reverse*
Domain name / Network: `IP address of docker host (e.g. 192..)`
Master server: `ns.sub.example.com`
Email address: `some@email`
-> Create
**Zone type:** *Forward*
Domain name / Network: `sub.example.com`
Master server: `ns.sub.example.com`
Email address: `some@email`
-> Create
### Zone page for `sub.example.com`
#### Address
**Name:** `ns`
Time-To-Live: *--default or custom--*
Address: `IP address of docker host (e.g. 192..)`
**Name:** `somehost`
Time-To-Live: *--default or custom--*
Address: `IP address of docker host (e.g. 192..)`
#### Check Records
*--run check for any problems--*
### Module Index (a.k.a. Module Config)
#### Check BIND Config
*--run check for any problems--*
#### Apply Configuration
*--output from config change should appear in the docker logs terminal--*
### Verify
Now, from the development machine (e.g. a mac running the vbox docker host), try running:
```
host somehost.sub.example.com 192..
host google.com 192..dig @192.. somehost.sub.example.com
dig @192.. google.comping somehost.sub.example.com
```Now restart the container, to make sure the changes properly persist:
```
docker stop container-name
docker start container-name
docker logs -f container-name
```The `host` and `dig` commands given above should work as before.