-
Notifications
You must be signed in to change notification settings - Fork 19
Install Docker dynamic DNS
Christophe Labouisse edited this page May 29, 2015
·
1 revision
Before attempting to install docker-ddns.py
you should ensure you have a properly running bind9 configured for dynamic update. Check this page for a quick how-to.
First you have to install python3
and pip3
. On a Debian based distro the command should be:
sudo apt-get install python3 python3-pip
Then to install the dependencies you have to use pip3
:
sudo pip3 install -r requirements.txt
You can copy dockerDDNS.py
in the right directory:
sudo cp dockerDDNS.py /usr/local/bin
Configuration files are provided in the upstart
directory:
sudo cp upstart/docker-ddns.conf /etc/init
sudo cp upstart/docker-ddns /etc/default
sudo initctl reload-configuration
Before launching the service edit /etc/default/docker-ddns
to change the key to use to update the container zone.
Start the daemon:
sudo service docker-ddns start
Start a containers:
docker run -ti --name test-dns --rm debian:jessie /bin/bash
And while the container is running check the ip from another shell:
host test-dns.containers 127.0.0.1
After stopping the container the host should not be able to be found.