Description

The Docker Engine IP is the address used by containers to contact the Docker engine itself. It's a separate address from the subnet used by the containers, and can sometimes conflict with existing address schemes, just like the container subnets do. It's why we made them assignable - Docker just rotates through a range by default. The Docker Engine IP is assignable too, with this procedure. The default is 172.17.0.1, so if that doesn't conflict with existing IP ranges in your network, you don't need to worry about this.  This article explains how to set the Docker Engine IP.

Prerequisites

  • You need to have Docker (though not necessarily GroundWork Monitor) installed
  • You will need sudo or root level access to the Linux host in which you want to run GroundWork Monitor
  • If GroundWork Monitor is running, you will need to take it down for a minute, so make sure to arrange downtime as needed

Steps

The following example is for Ubuntu Linux. Similar commands can be used to the same effect on other versions. 

  1. Create (or, if you already have one, edit) the file named daemon.json under /etc/docker/, e.g.,:

    sudo vi /etc/docker/daemon.json
  2. Add an entry for bip that doesn't conflict with your network address scheme. For example if the default 172.17.0.0/16 range is in use but the 172.27.0.0/16 range is not, you can add the section:

    {
      "bip": "172.27.0.1/16"
    }

    and save the file. 

  3. Stop GroundWork if it is running:

    cd gw8
    docker-compose down
    CODE
  4. Restart the Docker daemon to pick up the change: 

    sudo systemctl restart docker
    CODE
  5. You can check the new address is in use like this:

    ip addr docker0
    CODE

    which should give you something like:

    docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 02:42:50:11:a6:62 brd ff:ff:ff:ff:ff:ff
        inet 172.27.0.1/16 brd 172.26.255.255 scope global docker0
           valid_lft forever preferred_lft forever

Related Resources