<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version:2.6.2</li>
<li>Operating System version: mac 10.13.6</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>in this example <a href="https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-docker">https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-docker</a></li>
<li>docker run -t --net=host dubbo-sample-docker:latest</li>
<li>server not start</li>
<li>[DUBBO] Could not get local host ip address, will use 127.0.0.1 instead., dubbo version: 2.6.2, current host: 127.0.0.1</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？<br>
support docker host network</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!
ERROR 1 --- [           main] com.alibaba.dubbo.common.utils.NetUtils  :  [DUBBO] Could not get local host ip address, will use 127.0.0.1 instead., dubbo version: 2.6.2, current host: 127.0.0.1
"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
ERROR 1 --- [           main] com.alibaba.dubbo.common.utils.NetUtils  :  [DUBBO] Could not get local host ip address, will use 127.0.0.1 instead., dubbo version: 2.6.2, current host: 127.0.0.1

</code></pre></div>
<p dir="auto">目前我有一个疑惑，dubbo的服务消费者跟提供者都用容器去包装，然后发布在容器云里面。一般来说不应该去修改容器镜像内的东西，但是服务的发现会用网卡ip信息去实现。网上有说要改host文件或者该dubbo的配置文件，但都不太现实，如果是基于弹性伸缩的情况下，每次都得去改配置，而且注册的都是用宿主机的ip，很显然是不正确的。有没有办法通过DNS做域名映射实现服务注册以及服务消费呢？或者dubbo团队能否提供一些镜像案例给我们参考参考。</p>