title: Unable to curl from one container to another
body: <p>I have two containers in one docker-compose.yml. Both are on same on same network. I have added the dependency using "depends_on", I am able to ping the other container, but curl is not working.</p>
  
  <pre><code>version: "2.1"
  services:
      web:
              restart: always
              build:
                      context: .
                      dockerfile: web.dockerfile
              ports:
                      - "9000:8080"
              expose:
                      - "8080"
  
              networks:
                      - test
  
      nginx_web:
              restart: always
              build:
                      context: .
                      dockerfile: nginx_web.dockerfile
              ports:
                      - "8100:80"
              expose:
                      - "80"
              depends_on:
                      - web
              networks:
                      - test
      networks:
              test:
  </code></pre>
  
  <p>When I am trying ping from nginx_web container to web, it is working fine. But the curl isn't working. I am getting </p>
  
  <pre><code>curl: (7) Failed to connect to 172.28.0.7 port 8080: Connection refused
  </code></pre>
  
  <p>And when I am doing curl from the host machine directly to web at port 9000, it is working fine.</p>