More than one IP for docker container.

Plato

Contributor
Joined
Mar 24, 2016
Messages
101
I'm using rancher os for docker in Freenas 11.1 and I have a question..

As you know every container I create share the same bridge network and numbered like 172.x.x.x etc.. If you want to create multiple containers with same registered ports, you need to assign a different port number for one of the containers, because they're all mapped to the host's ip..

Is it possible to use more than one IP address for the host ( rancherOs ) and assign containers to another bridge network which will map to those IP addresses instead of primary IP?
 

Plato

Contributor
Joined
Mar 24, 2016
Messages
101
The solution could lie at adding another NIC to RancherOS VM, although as far as I see I couldn't do this with WebUI of the current version I'm using ( 11.2 ).. Although it may be available in future iterations. I'll see if I could add another nic manually, through configuration files.. Not sure yet if I could get it to work though.

Other than that there is an option to add another interface I found here. Though it seems this doesn't work as I intended because it's like a mirror of the eth0.
 
Top