How to automatically define docker networks?


#1

Hi, I have installed RancherOS 1.4.2. I can execute:

docker network create --driver bridge --ip-range=172.11.0.0/24 --subnet=172.11.0.0/24 mynet

and interestingly, this even survives a reboot. So that’s great so far.

Now I want to be able to install RancherOS with mynet already available, i.e., define it in cloud-config.yml. To my knowledge, this is not possible.

So what is the correct way to initially define a docker network in RancherOS? And how can I connect services to that network in cloud-config.yml?


#2

So… what does no answer mean? That it’s not possible at all?


#3

Maybe this command is what you want: ros install -d /dev/xxx --append "rancher.docker.bip=172.22.42.1/16"