Works with boot2docker.

The DOCKER_BRIDGE_IP is set on the remote host, so it will be found
correctly on boot2docker.
This commit is contained in:
Paul Bellamy
2015-08-27 16:43:14 +01:00
parent cdaaf2e1da
commit 26eea6eab2

2
scope
View File

@@ -99,7 +99,7 @@ weave_dns_present() {
}
set_docker_bridge_ip() {
DOCKER_BRIDGE_IP=$(ip -4 addr show dev $DOCKER_BRIDGE | grep -m1 -o 'inet [.0-9]*')
DOCKER_BRIDGE_IP=$(docker run --rm --net=host --entrypoint /bin/sh $SCOPE_IMAGE -c "ip -f inet address show dev $DOCKER_BRIDGE" | grep -m1 -o 'inet \([.0-9]\)*')
DOCKER_BRIDGE_IP=${DOCKER_BRIDGE_IP#inet }
}