Providing static IP Address to a IoT Edge gateway module (Basically a docker container)

We have set up IoT edge as a gateway on Azure Linux VM. Which has multiple modules(containers) running inside it which is by default.

This gateway setup comes with the custom network bridge for containers so that containers can interact with each other. which is like this.

The mosquitto module(container) in this setup has dynamic IP as its IP changes every time we boot up this gateway. But we want the IP of the mosquitto to be static. So we tried this and this method. We got the below error(the Blue line is for hiding IP):
enter image description here

And this:

enter image description here

How can we solve this and provide a static IP to this module(container)?

Source: Docker Questions

LEAVE A COMMENT