Connecting from outside the container
The database server exposes port 1521 for Oracle client connections over SQL Net protocol and port 5500 for Oracle XML DB. SQL Plus or any JDBC client can be used to connect to the database server from outside the container.
To connect from outside the container start the container with
-p option as,
$ docker run -d -it --name <Oracle-DB> -P store/oracle/database-enterprise:184.108.40.206
-P indicates the ports are allocated by Docker. The mapped port can be discovered by executing
$ docker port <Oracle-DB>
1521/tcp -> 0.0.0.0:<mapped host port>
<mapped host port> and
<ip-address of host> create
tnsnames.ora in the directory pointed to by environment variable
I successfully instal and run the image but when i run docker port command I get access is denied. Any suggestion?