I pulled the Oracle docker image from the Oracle Container Registry (container-registry.oracle.com/database/standard: and created a container as per the instructions, leaving the environment file blank so as to keep all the parameters as their defaults (I am aware that I should change the password etc but right now I just want to get it working).

$ docker run -d --env-file ./db_env.dat -p 1527:1521 -p 5507:5500 -it --name dockerDB --shm-size="8g" container-registry.oracle.com/database/standard

I was able to successfully start the container, and can access it via docker exec. I was also able to verify that the Oracle instance was running correctly by executing some sqlplus against it from the shell inside the container.

However, I am not able to connect to the Oracle instance from my host machine, either through SQL Developer:

Developer hanging connection

or through sqlplus:

SQL*Plus hanging connection

I get no errors, but the connection process just hangs forever. Do I need to change some setup somewhere or have I got the details wrong?


1 Answer 1


I'm running Oracle 11g Personal edition docker container

$ docker ps
CONTAINER ID        IMAGE                                    COMMAND                  CREATED             STATUS              PORTS                                                                     NAMES
d84af138d77a        oracleinanutshell/oracle-xe-11g:latest   "/bin/sh -c '/usr/sb…"   22 minutes ago      Up 22 minutes>22/tcp,>1521/tcp,>8080/tcp   oracle-xe-11g

As you can see port 1521 was mapped to 32776.

Replace with ipaddress of docker vm running on Virtualbox i.e

 sqlplus test/[email protected]:32776/XE

SQL*Plus: Release - Production on Fri Aug 9 13:12:19 2019

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

SQL> select * from v$version;

Oracle Database 11g Express Edition Release - 64bit Production
PL/SQL Release - Production
CORE      Production
TNS for Linux: Version - Production
NLSRTL Version - Production

If you're trying to login as sys user add sysdba at the end

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.