title: How to get docker oracle container ip into the java application using docker-compose?
body: <p>The below code iam using in docker-compose:</p>
  
  <pre><code>integration_test:
  
    image: service:1.0.0
  
    volumes:
      - .:/service
  
    links:
     - oracle_container
    # used volumes_from as workaround to wait until the following containers to start
  
    volumes_from:
     - oracle_container
  
    container_name: integration_test
  
    tty: true
  
    environment:
      USER: go
  
    command: ["mvn clean install -DskipTests"]
  
  oracle_container:
  
    image: inmage_name:1.0.0
  
    container_name: oracle_container
  
    ports:
      - "49161:1521"
  </code></pre>
  
  <p>I want to make the both containers talk application-->oracle</p>
  
  <p>Both containers are running in same machine and i used the below jdbc string to connect the oracle via application,</p>
  
  <p>jdbc:oracle:thin:@localhost:49161/xe</p>
  
  <p>But iam not able to connect the oracle and its throwing SQLRecoverable Exception.</p>
  
  <p>As per my understanding, this comes under Docker Networking and I have used links to connect two containers. but this issue is with the connection string and more specifically ip of the oracle container. </p>
  
  <p>Can someone help on this issue?</p>