Hey all,
On my company’s private network, we have infrastructure deployed all throughout the 172.17.0.0/16 range. This is in conflict with the subnet that Docker natively chooses on its own accord, but I’ve been able to get around this a couple ways:
Running ubuntu 14.04, Docker version 17.09.
/etc/default/docker
has DOCKER_OPTS:
DOCKER_OPTS="--bip=192.168.252.1/24" # sets the default docker0 subnet
Then, I deploy Drone using a custom network as well:
docker network create --subnet=192.168.251.0/24 primary_network
And refer to it in docker-compose.yml
for Drone:
networks:
default:
external:
name: primary_network
But unfortunately, the output of route
looks like this when Drone does a build:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default v300 0.0.0.0 UG 0 0 0 eth0
10.11.165.0 * 255.255.255.0 U 0 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 br-f6a49107f69f
192.168.251.0 * 255.255.255.0 U 0 0 0 br-8d7101c99db3
192.168.252.0 * 255.255.255.0 U 0 0 0 docker0
I noticed the environment variable DRONE_NETWORK
in the source code for Drone, but I have not had success with it. Has anyone been able to control the IP address range for the bridge networks that Drone creates?