Update the Docker subnet configurations

This procedure for on-prem/self-hosted server installations shows how to update the default configuration settings for Docker’s subnets (172.17.0.0/16). This is recommended since, by default, Docker uses commonly used RFC 1918 subnets that may cause conflicts with agents deployed in networks with the same address space.

Step 1: Update the following file:

/etc/docker/daemon.json

Add the following into this file (if it doesn’t exist then create it):

{
    "bip":"198.18.252.130/28",
    "fixed-cidr":"198.18.252.128/28",
    "default-gateway":"198.18.252.129"
}

Step 2: Restart the services:

service docker restart
nb-docker-compose down
nb-docker-compose up -d

watch docker ps

#check networks:
netstat -rn

If anything goes wrong check the docker daemon logs: /var/log/upstart/docker.log

If the log is not there then check here: logging - Where is the Docker daemon log? - Stack Overflow

If the NetBeez services don’t successfully start then try restarting them: Server Docker Containers: Start/Stop/Check

Configuration should look like this (netstat -rn)

198.18.252.112 0.0.0.0 255.255.255.240 U  0 0   0 br-5be9904f0518
198.18.252.128 0.0.0.0 255.255.255.240 U  0 0   0 docker0
198.18.252.144 0.0.0.0 255.255.255.252 U  0 0   0 br-c58b044bfd67
198.18.252.160 0.0.0.0 255.255.255.248 U  0 0   0 br-4b69573027b9
198.18.252.176 0.0.0.0 255.255.255.240 U  0 0   0 br-05bd337a691e
198.18.252.192 0.0.0.0 255.255.255.240 U  0 0   0 br-1d9d57e29812
198.18.252.208 0.0.0.0 255.255.255.240 U  0 0   0 br-32c6d4c269b4
198.18.252.224 0.0.0.0 255.255.255.240 U  0 0   0 br-6a826bf57396
1 Like