Skip to content

wscherphof/oracle-12c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instant Oracle datase server

A Docker image with Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 running in Oracle Linux 7

  • Default ORCL database on port 1521

Install

  1. Install Docker
  2. $ docker pull wscherphof/oracle-xe-11g-r2

Run

Create and run a container named db:

$ docker run --privileged -dP --name orcl wscherphof/oracle-12c
989f1b41b1f00c53576ab85e773b60f2458a75c108c12d4ac3d70be4e801b563

Yes, alas, this has to run privileged in order to gain permission for the mount statement in /tmp/start that ups the amount of shared memory, which has a hard value of 64M in Docker; see this GitHub issue

Connect

The default password for the sys user is change_on_install, and for system it's manager The ORCL database port 1521 is bound to the Docker host through run -P. To find the host's port:

$ docker port orcl 1521
0.0.0.0:49189

So from the host, you can connect with system/manager@localhost:49189/ORCL Though if using Boot2Docker, you need the actual ip address instead of localhost:

$ boot2docker ip

The VM's Host only interface IP address is: 192.168.59.103

If you're looking for a databse client, consider sqlplus

$ sqlplus system/[email protected]:49189/ORCL

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 15 14:40:52 2014

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> |

Monitor

The container runs a process that starts up the database, and then continues to check each minute if the database is still running, and start it if it's not. To see the output of that process:

$ docker logs db
Fri Sep 12 20:04:48 UTC 2014

SQL*Plus: Release 12.1.0.2.0 Production on Fri Sep 12 20:04:49 2014

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

Connected to an idle instance.
ORACLE instance started.

Total System Global Area 1073741824 bytes
Fixed Size		    2932632 bytes
Variable Size		  696254568 bytes
Database Buffers	  369098752 bytes
Redo Buffers		    5455872 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-SEP-2014 20:05:18

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                12-SEP-2014 20:04:48
Uptime                    0 days 0 hr. 0 min. 29 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/6568827caac6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=6568827caac6)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully

Enter

There's no ssh deamon or similar configured in the image. If you need a command prompt inside the container, consider nsenter (and mind the Boot2Docker note there)

Build

Should you want to modify & build your own image:

  1. Download & unzip the Oracle install package (2 files) from Oracle Tech Net; this will get you a database folder
  2. Put the database folder under the step1 folder
  3. cd to the step1 folder
  4. $ docker build -t oracle-12c:step1 .
  5. $ docker run --privileged -ti --name step1 oracle-12c:step1 /bin/bash
  6. -$ . /tmp/shm
  7. -$ . /tmp/install (takes about 5m)
  8. -$ exit
  9. $ docker commit step1 oracle_12c:installed
  10. $ cd ../step2
  11. $ docker build -t oracle-12c:step2 .
  12. $ docker run --privileged -ti --name step2 oracle-12c:step2 /bin/bash
  13. -$ /tmp/create (takes about 15m)
  14. -$ exit
  15. $ docker commit step2 oracle_12c:created
  16. $ cd ../step3
  17. $ docker build -t oracle-12c .

License

GNU Lesser General Public License (LGPL)

About

Docker image with Oracle database server on Oracle Linux. Formerly known as https://registry.hub.docker.com/u/wscherphof/oracle-12c/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages