Containers are not linked with docker-compose version 2
<p>I have a docker-compose file that I upgraded from version 1 to version 2.</p>

<p>It set ups a simple Selenium hub with a firefox node.</p>

<p>When I set it up as version 1 it launches fine. When I set it up with version 2 the ff container returns <code>"Not linked with a running Hub container"</code> and exits.</p>

<p>As I researched it and understood it , is that the linkage between the containers somehow suffers.</p>

<p>Is there a solution ?? Am I missing something ??</p>

<pre><code>version: '2'
services:
  hub:
    container_name: hub
    image: selenium/hub 
    ports:
      - "8080:4444" # HOST:CONTAINER
    expose:
      - "4444" 

  ff:
    container_name: ff
    image: selenium/node-firefox 
    links:
      - hub
    expose:
      - "5555" 
</code></pre>