title: Is posible to call api from an container to another in docker environment by container_name:port?
body: <p>I'm new to docker.</p>
  <p>I have one service and other service need call the service in docker environment. I wonder if it is posible to call other service by container name like that:</p>
  <p>http://container1:port</p>
  <pre><code>
  services:
    service-a:
      image: service.a
      container_name: service_a
      ports:
        - '5005:5000'
      networks:
        - mynetwork
      environment:
        - 'CONSUL_ENABLED=true'
  
    service-b:
      image: service.b
      container_name: service_b
      ports:
        - '5004:5000'
      networks:
        - mynetwork
      environment:
        - 'CONSUL_ENABLED=true'
  
  networks:
      mynetwork:
          name: aaa-network
  </code></pre>
  <p>can Service-a call to service b by: http://service_b:port ?</p>