Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codylane/docker-dnsmasq-automatic-update
A utility if using docker for dynamically dnsmasq DNS
https://github.com/codylane/docker-dnsmasq-automatic-update
Last synced: 4 days ago
JSON representation
A utility if using docker for dynamically dnsmasq DNS
- Host: GitHub
- URL: https://github.com/codylane/docker-dnsmasq-automatic-update
- Owner: codylane
- Created: 2015-04-16T03:47:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T01:16:02.000Z (about 9 years ago)
- Last Synced: 2023-08-03T01:12:15.159Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-dnsmasq-automatic-update
A utility if using docker for dynamically updating DNS if using dnsmasq# Pre-Requisites
* You need to install dnsmasq# DNSMASQ configuration file
```
cat > /etc/dnsmasq.d/docker.conf << EOF
interface=docker0
conf-dir=/opt/docker/dnsmasq.d
EOFsudo service dnsmasq restart
```# Usage
A helpful development related utilty for dynamically updating DNS when a Docker container starts up. The `detect-update` script runs in the background listening for running containers. When it finds one, it will either add/update a dnsmasq entry.NOTE: Since I didn't spend a lot of time on these scripts they all need to be in the same directory. I have not actually tested if this will work with chkconfig, initctl or upstart.
## To start the detector in the background
```
sudo ./dnsmasq-update start
```## To stop the detector
```
sudo ./dnsmasq-udpate stop
```## To check the status of the detector
It's running if the status code is 0, otherwise it is not running.
```
sudo ./dnsmasq-update status
echo $?
```NOTE: These scripts were written in 30 minutes, so if you find issues/bugs please submit a pull request and i'll get to it ASAP. I'm also very open to feedback if you find this useful or not.
# Issues
Please submit pull requests if/when you find an issue and I'll be happy to review and merge.