This is considerably modified from the Joukou original. We've
- shortned the skydns names,
- omitted .local as the root zone
- added a hook so that we can create RRs of host.domain with no zone
- Added RT53 announcements if RT53_DOMAIN_ID is set.
There are two modes of operation, the first is for annoucing the IP address of
a given container's internal eth0
(virtual) network card:
docker run -v /var/run/docker.sock:/var/run/docker.sock -e "SKYDNS_CONTAINER=name-of-container" -e "SKYDNS_INSTANCE=1" -e "SKYDNS_PORT=8080" -e "ETCD_ADDR="172.17.42.1:4001" -e "ETCD_TTL=30"
The second is for announcing the IP address of an interface on the CoreOS host
machine itself; i.e. for use with --net=host
. Caution: This tells Docker
to not containerize the container's networking so network-wise the container(s)
live "outside" in the main CoreOS host and have full access to its network
interfaces. This can lead to processes in the container being able to do
unexpected things like restart your computer.
docker run --net=host -e "SKYDNS_IFACE=ens3" -e "ETCD_ADDR=172.17.42.1:4001" -e "ETCD_TTL=30" -e "SKYDNS_NAME=example"
In both cases the container process will run, updating etcd, every half of the etcd TTL.
See joukou/joukou-fleet
.
Copyright © 2014 Joukou Ltd.
Generic SkyDNS Service Announcement Dockerfile for CoreOS is under the Apache 2.0 license. See the LICENSE file for details.