Public Repository

Last pushed: a year ago
Short Description
Oracle 12c EE image with web management console
Full Description

Oracle 12c EE image

Latest:(Latest/Dockerfile)

Image provides "Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production" with Enterprise Manager Lite console enabled.
For those who are suffering from SQLPLUS inability to provide history using keyboard arrows "rlwrap" utility has been incorporated as well

Running image

$ docker run -d --name oracle --privileged absolutapps/oracle-12c-ee

This will create a default database and run oracle inside docker container. Oracle should be run in “privileged” mode as oracle requires special ports and kernel settings to be enabled However in real environment it's better to use more comprehensive statement useful for real life:

$ docker run -d --name oracle \
  --privileged -v $(pwd)/oradata:/u01/app/oracle \
  -p 8080:8080 -p 1521:1521 absolutapps/oracle-12c-ee

In this case database settings and data will be saved to $(pwd)/oradata folder and ports will be exposed either to localhost or boot2docker container (MacOs and Win).

Additional options

ORACLE_SID - Oracle SID (default to ORCL)
SERVICE_NAME - $ORACLE_SID
Listener port - 1521
EM port - 8080
SYS, SYSTEM passwords: oracle
Amount of memory 40% set by INIT_MEM_PST

Running scripts at startup

Shell scripts (sh) and sql scripts (sql) placed in /oracle.init.d/directory will be executed after database creation (or start). Please note that sql scripts are executed under SYS user account, so in order to execute sql under different account construction like “connect user/password” should be used at the beginning of the script. Shell scripts are executed as root. Please use “gosu” instead of “su - ” to run script under different account. (More about “gosu” advantages can be found here https://github.com/tianon/gosu/)

Using rlwrap

This utility allows user to use history in sqlplus in the same way as with MySQL. Just use "rlwrap sqlplus" instead of "sqlplus"

Docker Pull Command
Owner
absolutapps

Comments (2)
hynnet
5 days ago

latest version is 12.2.0.1, but this version is 12.1.0.2.0 :(

docker run --restart always --name oracle_ee --privileged -d -p 1521:1521 -p 8080:8080 -v /data/docker-files/oracle/data:/u01/app/oracle -v /data/docker-files/oracle/init:/oracle.init.d:ro -e NLS_LANG=AMERICAN_CHINA.AL32UTF8
absolutapps/oracle-12c-ee ; docker logs -f oracle_ee

hubbitus
9 months ago

I got error rlwrap: error: My terminal reports width=0 (is it emacs?) I can't handle this, sorry! when try use rlwrap on exec like:

$ docker exec -it oracle rlwrap sqlplus SYS/oracle@localhost:1521/ORCL as sysdba
rlwrap: error: My terminal reports width=0 (is it emacs?)  I can't handle this, sorry!

On workaround is use bach instead like:

$ docker exec -it oracle bash -ic 'rlwrap sqlplus SYS/oracle@localhost:1521/ORCL as sysdba '
rlwrap: warning: environment variable TERM not set, assuming vt100
…

But it also reported same error from-time-to-time! So some race condition there.
I solve it with next workaround:

docker exec -it oracle bash -ic 'sleep 0.1; rlwrap sqlplus SYS/oracle@localhost:1521/ORCL as sysdba '