Remote DNS servers to be asked when can not solve from docker or local storage.
Default: 8.8.8.8
.
Web GUI port, Default: 5380
.
Default: 53
.
Default: INFO
.
Env | JSON | Terminal |
---|---|---|
MG_LOG_LEVEL |
logLevel |
See –help |
Where the log will be written. Default: console.
Env | JSON | Terminal |
---|---|---|
MG_LOG_FILE |
logFile |
See –help |
If should register container name / service name as a hostname. Default: false.
Env | JSON | Terminal |
---|---|---|
MG_REGISTER_CONTAINER_NAMES |
registerContainerNames |
See –help |
The container names domain used on the registered container, services. Default: docker
.
Ex:
docker run --rm --name nginx nginx
Will register a container with the name nginx.docker
Env | JSON | Terminal |
---|---|---|
MG_DOMAIN |
domain |
See –help |
If should create a bridge network for dps container. Default: false.
If should connect all containers to dps container so they can surely talk with each other. requires DPS Network Option. Default: false.
If DPS must be set as the default DNS automatically, commonly requires DPS be run as sudo/administrator permissions, this options also won’t work in some cases when running inside a docker container, see the feature details.
Hostname to solve machine IP, domain can be changed by Domain option. Default: host.docker
.
Env | JSON | Terminal |
---|---|---|
MG_HOST_MACHINE_HOSTNAME |
hostMachineHostname |
See –help |
Protocol to start the dns server. Default: UDP_TCP
.
Docker host address. Default value is SO dependent.
Env | JSON | Terminal |
---|---|---|
MG_DOCKER_HOST |
dockerHost |
See –help |
If must comment all existing nameservers at resolv.conf
file (Linux, MacOS) or just put DPS at the first place.
Default: true.
Env | JSON | Terminal |
---|---|---|
MG_RESOLVCONF_OVERRIDE_NAMESERVERS |
resolvConfOverrideNameServers |
See –help |
Linux/Mac resolvconf or systemd-resolved path to set DPS as default DNS.
Default: /host/etc/systemd/resolved.conf,/host/etc/resolv.conf,/etc/systemd/resolved.conf,/etc/resolv.conf
.
Env | JSON | Terminal |
---|---|---|
MG_RESOLVCONF | See –help |
If remote servers like 8.8.8.8 must be disabled and only local solvers like docker containers or local db must be used. Default: false.
Env | JSON | Terminal |
---|---|---|
MG_NO_REMOTE_SERVERS |
noRemoteServers |
See –help |
Active Env used to query local db entries. Default `` (Empty String).
Env | JSON | Terminal |
---|---|---|
activeEnv |
Response code to use when no entries are returned by the configured solvers. Default: 3
Env | JSON | Terminal |
---|---|---|
MG_NO_ENTRIES_RESPONSE_CODE | noEntriesResponseCode |
See -help |
See Local Entries Solving docs.
Whether should answer host machine IP when a matching container is found but it hasn’t an IP to be answered, see Github Issue #442. Default: true
Env | JSON | Terminal |
---|---|---|
MG_DOCKER_SOLVER_HOST_MACHINE_FALLBACK_ACTIVE | dockerSolverHostMachineFallbackActive |
See -help |
Version 2
{
"version": 2,
"remoteDnsServers": [ "8.8.8.8", "4.4.4.4:54" ],
"envs": [
{
"name": "", // empty string is the default enviroment
"hostnames": [ // all local hostnames entries
{
"id": 1, // (optional) used to control it will be automatically generated if not passed
"type": "A",
"hostname": "github.com",
"ip": "192.168.0.1",
"ttl": 255 // how many seconds cache this entry
}
]
}
],
"activeEnv": "",
"webServerPort": 5380,
"dnsServerPort": 53,
"logLevel": "INFO",
"logFile": "console",
"registerContainerNames": false,
"domain": "docker",
"dpsNetwork": false,
"dpsNetworkAutoConnect": false,
"defaultDns": true,
"hostMachineHostname" : "host.docker",
"serverProtocol": "UDP_TCP",
"dockerHost": null,
"resolvConfOverrideNameServers": true,
"noRemoteServers": false,
"noEntriesResponseCode": 3,
"dockerSolverHostMachineFallbackActive": true
}
Boolean values
You can use
1
ortrue
(case insensitive) to specify which the flag is activated, any other value will be considered false.
Run one of the commands below to get the commandline instructions help:
$ ./dns-proxy-server --help
$ docker run defreitas/dns-proxy-server --help