title: There is a way to ping a Docker container using its hostname, from another Docker Container?
body: <p>I am looking for a solution to ping a Docker container using its hostname, from another Docker Container.
  I tried as follow:</p>
  
  <p>starting first Docker container:</p>
  
  <pre><code>docker run --rm -ti --hostname=repohost --name=repo repo
  </code></pre>
  
  <p>starting second Docker container, link to first and start bash:</p>
  
  <pre><code>docker run --rm -ti --hostname=repo2host --link repo:rp repo2 /bin/bash
  </code></pre>
  
  <p>on bash started on repo2</p>
  
  <pre><code>ping repohost
  </code></pre>
  
  <p>it remain on pending without any result.</p>
  
  <p>Can someone tell me if there is a solution for this?</p>