Use full container names when populating weavedns. Fixes #250
This commit is contained in:
1 parent
42e7c05ead
commit
ccd6cb0440
1 file changed
+1
-1
@@ -333,7 +333,7 @@ populate_dns() {
|
|||||||
echo "If running, it will not be pre-populated." >&2
|
echo "If running, it will not be pre-populated." >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for CONTAINER in $(docker ps -q); do
|
for CONTAINER in $(docker ps -q --no-trunc); do
|
||||||
MORE_ARGS=$(docker inspect --format '--data-urlencode fqdn={{ .Config.Hostname }}.{{ .Config.Domainname }}.' $CONTAINER 2>/dev/null) && true
|
MORE_ARGS=$(docker inspect --format '--data-urlencode fqdn={{ .Config.Hostname }}.{{ .Config.Domainname }}.' $CONTAINER 2>/dev/null) && true
|
||||||
if CONTAINER_ADDRS=$(with_container_netns $CONTAINER container_weave_addrs 2>&1) ; then
|
if CONTAINER_ADDRS=$(with_container_netns $CONTAINER container_weave_addrs 2>&1) ; then
|
||||||
CONTAINER_IPS=$(echo "$CONTAINER_ADDRS" | grep -o 'inet .*' | sed -e 's/inet \([^/]*\)\/\(.*\)/\1/')
|
CONTAINER_IPS=$(echo "$CONTAINER_ADDRS" | grep -o 'inet .*' | sed -e 's/inet \([^/]*\)\/\(.*\)/\1/')
|
||||||
|
|||||||
Reference in new issue
Block a user