Install oracle 12c on docker for windows

Oracle suggests:

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 or -p option as,

$ docker run -d -it --name <Oracle-DB> -P store/oracle/database-enterprise:12.2.0.1

option -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>

Using this <mapped host port> and <ip-address of host> create tnsnames.ora in the directory pointed to by environment variable TNS_ADMIN .

I successfully instal and run the image but when i run docker port command I get access is denied. Any suggestion?

what if you just run " docker port <Oracle-DB>" ?

Yes it mapped the ports to host.Thanks