From 905ec927a3deb25543ab0855183dfa31be89843e Mon Sep 17 00:00:00 2001 From: Denis Zaripov Date: Tue, 4 Aug 2020 20:43:10 +0500 Subject: [PATCH] add info about network aliases Update documentation for #3090 --- site/tasks/weavedns/weavedns.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/site/tasks/weavedns/weavedns.md b/site/tasks/weavedns/weavedns.md index 6b685349..52d93358 100644 --- a/site/tasks/weavedns/weavedns.md +++ b/site/tasks/weavedns/weavedns.md @@ -34,6 +34,17 @@ root@ubuntu:/# ping pingme ... ``` +Moreover, weaveDNS always register all network aliases (--network-alias option to docker run). + +``` +host1$ docker run --network weave --network-alias pingme --network-alias pingme2 -dti weaveworks/ubuntu +host1$ docker run --network weave --hostname=ubuntu.weave.local -ti weaveworks/ubuntu +root@ubuntu:/# ping pingme +... +root@ubuntu:/# ping pingme2 +... +``` + > **Note** If both hostname and container name are specified at the same time, the hostname takes precedence. In this circumstance, if the hostname is not in the weaveDNS domain, the container is *not*