Datasource name for a local Oracle Docker Instance

I am trying to connect to an oracle docker instance through a framework. The framework requires the table name and logical host name to be passed in.

I am able to connect to the docker instance using jdbc connection in java.

My question is how do i set the logical host name to this docker instance that i can use.

Things I have tried:

  • I tried by adding a logical host in /etc/hosts file in the image using docker run command.
  • I tried passing in the docker name as the logical host
  • I tried giving the host name mentioned in tnsnames.ora file in the image

I am using Docker version 18.09.1, build 4c52b90 and Oracle v12.2.0.1. Any pointers would be helpful.

Thanks in advance!!

#oracle #docker

3 Likes1.65 GEEK