Skip to content

Disable remote resolvers through config.json not working since 3.19.2 #513

@Sajito

Description

@Sajito

What is Happening

As the title says, it's currently impossible to disable remote resolvers using the config.json.
I found that with 3.19.2 the config has been refactored to use solverRemote.active instead of noRemoteServers.
But both settings in the json file won't disable them.

My config file looks like this:

{
  "version": 2,
  "activeEnv": "",
  "webServerPort": null,
  "dnsServerPort": null,
  "defaultDns": null,
  "logLevel": null,
  "logFile": null,
  "registerContainerNames": null,
  "hostMachineHostname": null,
  "domain": null,
  "dpsNetwork": true,
  "dpsNetworkAutoConnect": true,
  "resolvConfOverrideNameServers": false,
  "noRemoteServers": true,
  "noEntriesResponseCode": 2,
  "remoteDnsServers": [],
  "envs": [
    {
      "name": "",
      "hostnames": [
        {
          "id": 1,
          "hostname": ".localhost",
          "ip": "",
          "target": "host.docker",
          "ttl": 3600,
          "type": "CNAME"
        }
      ]
    }
  ],
  "solverRemote": {
    "active": false
  }
}

Using the command line flag works fine, though.

What is Expected

When querying for anything not listed in the config file, an error should be returned.
E. g. with the config above when querying for google.com, the response should be SERVFAIL, but instead the domain is actually resolved.

Specs

  • Docker Version:
    Client:
    Version:           27.0.3
    API version:       1.46
    Go version:        go1.22.4
    Git commit:        7d4bcd863a
    Built:             Mon Jul  1 21:15:54 2024
    OS/Arch:           linux/amd64
    Context:           default
    
    Server:
    Engine:
    Version:          27.0.3
    API version:      1.46 (minimum version 1.24)
    Go version:       go1.22.4
    Git commit:       662f78c0b1
    Built:            Mon Jul  1 21:15:54 2024
    OS/Arch:          linux/amd64
    Experimental:     false
    containerd:
    Version:          v1.7.19
    GitCommit:        2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41.m
    runc:
    Version:          1.1.13
    GitCommit:        
    docker-init:
    Version:          0.19.0
    GitCommit:        de40ad0
    
  • DPS Version:
    • 3.24.0-snapshot, but tried every version since 3.19.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmedUnexpected behavior (bug) which was reproduced by repo owners

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions