Docker anula la dirección IP de mi propio puente creado manualmente

Estoy intentando configurar Docker para conectar todos los contenedores a mi puente creado manualmente (br0) , no quiero que Docker cree o edite nada en mi puente, porque tengo otros services que usan y dependen de mi puente (como OpenVPN) por lo tanto, prefiero crear el puente usando mi propio script bash.

El problema surge cuando inicio el service de acoplador, Docker cambia la dirección IP de mi puente de lo que deseo (192.168.1.10) a otra dirección (169.254.xx).

My Docker versión 1.12.1, compilation 23cf638

Los pasos que hice

Creación de puente:

sudo brctl addbr br0 sudo brctl addif br0 eth0 sudo ip addr del 192.168.1.10/24 dev eth0 sudo ip addr add 192.168.1.10/24 dev br0 sudo ip route add default via 192.168.1.1 dev br0 

También eliminé el docker0 brdige pnetworkingeterminado.

Dile a Docker que use mi br0 en lugar del docker0 pnetworkingeterminado:

Pasar el parámetro -b br0 al script de inicio dockerd.service para decirle a Docker que quiero que use mi br0:

 sudo vi /etc/systemd/system/docker.service.d/overlay.conf 

Edité ExecStart para que fuera así:

 ExecStart=/usr/bin/dockerd --storage-driver=overlay -H fd:// -b=br0 

y entonces:

 sudo systemctl daemon-reload sudo systemctl restart docker 

Y ahora cuando reviso mi IP br0, NO es 192.168.1.10, vuelve a 172.17.xx , y cuando bash cambiarla ahora manualmente a 192.168.1.10, las interfaces en contenedores siguen usando 169.254.xx en lugar de la IP que quiero.

Ps cuando compruebo dónde están las interfaces de mis contenedores: brctl show , están realmente en mi br0 (eso significa que docker aceptó -b br0 paramter, pero simplemente ignora o anula mi dirección IP prevista).

¿Podría alguien ayudarme a vencer ese problema? me parece un error tal vez. Solo quiero que Docker use mi br0 con la dirección IP prevista 192.168.1.10.

Mi necesidad es que todos mis contenedores obtengan una dirección IP en el range que quiero. Gracias por adelantado.

Editado:

Mi /var/log/daemon.log

 Oct 10 20:41:12 raspberrypi systemd[1]: Stopping Docker Application Container Engine... Oct 10 20:41:12 raspberrypi dockerd[976]: time="2016-10-10T20:41:12.067551389Z" level=info msg="Processing signal 'terminated'" Oct 10 20:41:12 raspberrypi dockerd[976]: time="2016-10-10T20:41:12.128388194Z" level=info msg="stopping containerd after receiving terminated" Oct 10 20:41:13 raspberrypi systemd[1]: Stopped Docker Application Container Engine. Oct 10 20:41:13 raspberrypi systemd[1]: Stopping Docker Socket for the API. Oct 10 20:41:13 raspberrypi systemd[1]: Closed Docker Socket for the API. Oct 10 20:41:13 raspberrypi systemd[1]: Stopped Docker Application Container Engine. Oct 10 20:41:50 raspberrypi avahi-daemon[440]: Withdrawing address record for 169.254.124.135 on br0. Oct 10 20:41:50 raspberrypi dhcpcd[698]: br0: removing IP address 169.254.124.135/16 Oct 10 20:41:50 raspberrypi avahi-daemon[440]: Leaving mDNS multicast group on interface br0.IPv4 with address 169.254.124.135. Oct 10 20:41:50 raspberrypi avahi-daemon[440]: Interface br0.IPv4 no longer relevant for mDNS. Oct 10 20:41:50 raspberrypi dhcpcd[698]: br0: deleting route to 169.254.0.0/16 Oct 10 20:41:52 raspberrypi ntpd[723]: Deleting interface #7 br0, 169.254.124.135#123, interface stats: received=0, sent=0, dropped=0, active_time=516 secs Oct 10 20:41:52 raspberrypi ntpd[723]: peers refreshed Oct 10 20:42:58 raspberrypi avahi-daemon[440]: Joining mDNS multicast group on interface br0.IPv4 with address 192.168.1.19. Oct 10 20:42:58 raspberrypi avahi-daemon[440]: New relevant interface br0.IPv4 for mDNS. Oct 10 20:42:58 raspberrypi avahi-daemon[440]: Registering new address record for 192.168.1.19 on br0.IPv4. Oct 10 20:43:00 raspberrypi ntpd[723]: Listen normally on 8 br0 192.168.1.19 UDP 123 Oct 10 20:43:00 raspberrypi ntpd[723]: peers refreshed Oct 10 20:43:15 raspberrypi systemd[1]: getty@tty1.service has no holdoff time, scheduling restart. Oct 10 20:43:15 raspberrypi systemd[1]: Stopping Getty on tty1... Oct 10 20:43:15 raspberrypi systemd[1]: Starting Getty on tty1... Oct 10 20:43:15 raspberrypi systemd[1]: Started Getty on tty1. Oct 10 20:43:21 raspberrypi systemd[1]: getty@tty1.service has no holdoff time, scheduling restart. Oct 10 20:43:21 raspberrypi systemd[1]: Stopping Getty on tty1... Oct 10 20:43:21 raspberrypi systemd[1]: Starting Getty on tty1... Oct 10 20:43:21 raspberrypi systemd[1]: Started Getty on tty1. Oct 10 20:44:31 raspberrypi systemd[1]: Starting Docker Socket for the API. Oct 10 20:44:31 raspberrypi systemd[1]: Listening on Docker Socket for the API. Oct 10 20:44:31 raspberrypi systemd[1]: Starting Docker Application Container Engine... Oct 10 20:44:31 raspberrypi dockerd[1536]: time="2016-10-10T20:44:31.887581128Z" level=info msg="libcontainerd: new containerd process, pid: 1543" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.903109872Z" level=info msg="[graphdriver] using prior storage driver \"overlay\"" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.950908429Z" level=info msg="Graph migration to content-addressability took 0.00 seconds" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.951611338Z" level=warning msg="Your kernel does not support swap memory limit." Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.951800086Z" level=warning msg="Your kernel does not support kernel memory limit." Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.951906179Z" level=warning msg="Your kernel does not support cgroup cfs period" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.951993522Z" level=warning msg="Your kernel does not support cgroup cfs quotas" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.952173520Z" level=warning msg="Unable to find cpuset cgroup in mounts" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.952372059Z" level=warning msg="mountpoint for pids not found" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.953406319Z" level=info msg="Loading containers: start." Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.970612440Z" level=info msg="Firewalld running: false" Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.953406319Z" level=info msg="Loading containers: start." Oct 10 20:44:32 raspberrypi dockerd[1536]: time="2016-10-10T20:44:32.970612440Z" level=info msg="Firewalld running: false" Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Withdrawing address record for 192.168.1.19 on br0. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Leaving mDNS multicast group on interface br0.IPv4 with address 192.168.1.19. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Interface br0.IPv4 no longer relevant for mDNS. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Joining mDNS multicast group on interface br0.IPv4 with address 169.254.124.135. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: New relevant interface br0.IPv4 for mDNS. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Registering new address record for 169.254.124.135 on br0.IPv4. Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715576231Z" level=info msg="Loading containers: done." Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715837582Z" level=info msg="Daemon has completed initialization" Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715921435Z" level=info msg="Docker daemon" commit=23cf638 graphdriver=overlay version=1.12.1 Oct 10 20:44:33 raspberrypi systemd[1]: Started Docker Application Container Engine. Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.754984356Z" level=info msg="API listen on /var/run/docker.sock" Oct 10 20:44:34 raspberrypi ntpd[723]: Listen normally on 9 br0 169.254.124.135 UDP 123 Oct 10 20:44:34 raspberrypi ntpd[723]: Deleting interface #8 br0, 192.168.1.19#123, interface stats: received=0, sent=0, dropped=0, active_time=94 secs Oct 10 20:44:34 raspberrypi ntpd[723]: peers refreshed 

La parte interesante es la última parte (la copié aquí abajo):

 Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Withdrawing address record for 192.168.1.19 on br0. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Leaving mDNS multicast group on interface br0.IPv4 with address 192.168.1.19. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Interface br0.IPv4 no longer relevant for mDNS. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Joining mDNS multicast group on interface br0.IPv4 with address 169.254.124.135. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: New relevant interface br0.IPv4 for mDNS. Oct 10 20:44:33 raspberrypi avahi-daemon[440]: Registering new address record for 169.254.124.135 on br0.IPv4. Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715576231Z" level=info msg="Loading containers: done." Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715837582Z" level=info msg="Daemon has completed initialization" Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.715921435Z" level=info msg="Docker daemon" commit=23cf638 graphdriver=overlay version=1.12.1 Oct 10 20:44:33 raspberrypi systemd[1]: Started Docker Application Container Engine. Oct 10 20:44:33 raspberrypi dockerd[1536]: time="2016-10-10T20:44:33.754984356Z" level=info msg="API listen on /var/run/docker.sock" Oct 10 20:44:34 raspberrypi ntpd[723]: Listen normally on 9 br0 169.254.124.135 UDP 123 Oct 10 20:44:34 raspberrypi ntpd[723]: Deleting interface #8 br0, 192.168.1.19#123, interface stats: received=0, sent=0, dropped=0, active_time=94 

Una vez que el contenedor acoplable se está ejecutando, la configuration de networking no se puede editar. Intente ejecutar su contenedor de docker con --bip=CIDR y configure su IP de puente manualmente. Para más información siga aquí .