docker

package
v0.0.0-...-679ce87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 12 Imported by: 0

README

Docker

This is to create automatic PTR and A/AAA records for the docker daemon

NOTE: it is a good idea to have caching enabled in the Corefile due to possible delays with the docker daemon

Requirements

The CoreDNS server needs to be able to read the unix socket for docker (typically be part of the docker group)

Using

Example

docker.example.com 2001:db8::/64 172.19.0.0/16 {
    docker {
        suffix ".docker.example.com"
    }
    cache {
        success 1024
        denial 1024
    }
}
Options

suffix:

This is to specify the ending of the container, such as .docker.example.com with the container name mariadb would become the hostname mariadb.docker.example.com. Please note: the leading dot is REQUIRED

ttl: set the TTL (default 86400)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

type Docker struct {
	Config *config
	Next   plugin.Handler
}

Docker plugin

func (Docker) Name

func (r Docker) Name() string

Name implements the Handler interface.

func (Docker) ServeDNS

func (r Docker) ServeDNS(ctx context.Context, w dns.ResponseWriter, msg *dns.Msg) (int, error)

ServeDNS the function for the interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL