Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

default-address-pools is not recognized by docker

I am trying to configure docker-compose to use different network range by default, so I follow instructions from https://github.com/moby/moby/pull/29376

However, I get following error:

unable to configure the Docker docker daemon with file /etc/docker/daemon.json: the following directives don't match any configuration option: default-address-pools

Here is the content of daemon.json - it is the sample taken from the #29376.

{
  "default-address-pools": [
    {
      "scope": "local",
      "base": "172.80.0.0/16",
      "size": 24
    },
    {
      "scope": "global",
      "base": "172.90.0.0/16",
      "size": 24
    }
  ]
}

Please advise.

My env:

# uname -a
Linux gfn-classroom 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 
2018 x86_64 x86_64 x86_64 GNU/Linux

# docker --version
Docker version 17.12.0-ce, build c97c6d6

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
like image 669
Moisei Avatar asked Jan 16 '18 10:01

Moisei


2 Answers

This is merged in https://github.com/moby/moby/pull/36396 and (hopefully) will be available in 18.06. [Reference]

Also note changing default address pool is also available as a cli argument, e.g.:

/usr/bin/dockerd -H ... --default-address-pool base=172.29.0.0,size=16
like image 82
Taha Jahangir Avatar answered Sep 21 '22 11:09

Taha Jahangir


Pull-request https://github.com/moby/moby/pull/29376 was closed, not merged, so that feature is not available (yet) in Docker

like image 36
thaJeztah Avatar answered Sep 18 '22 11:09

thaJeztah