Making a valid docker daemon.json file

How do I merge these 2 parts (part 1. And part 2.) of the /etc/docker/daemon.json file in order to make a valid .json?

I’m completely inexperienced with .json files and struggling to make sense of them.

Any help is really appreciated.

1.

{
  "default-address-pools": [
    {
      "base": "172.30.0.0/16",
      "size": 24
    },
    {
      "base": "172.31.0.0/16",
      "size": 24
    }
  ]
}

2.

 {
    "hosts": [
        "unix:///var/run/docker.sock",
        "tcp://<host IP address>:2375"
    ]
}

Maybe check the doc.

1 Like

Thanks for the reply.

I actually used this to combine them together:

jq -s . daemon.json example.json > combined.json