How to change the Docker default subnet IP address

If the Docker Engine default bridge network is conflicting with your internal network hosts access, you can change the default Docker subnet by following these steps:

  1. First, you need to delete the containers inside the VM (vserver and postgres). Use the following two commands: 
    cd /opt/visionect
    sudo docker-compose stop
  2. Next, change the subnet IP inside "/etc/docker/daemon.json", by using this command:
    sudo vim /etc/docker/daemon.json
  3. Type in the Netmask IP. With the following structure. Please keep in mind that the IP used here is an example:
  4. Restart the Docker Daemon by using this command:
    sudo service docker restart
  5. Create a new VSS container and postgres with the following command:
    sudo docker-compose up -d

 And that’s it!

If you wish to learn more about changing the Docker default subnet IP address, click here.