Skip to content

gcusnieux/docker-oracle11g

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-oracle11g

Docker + Oralce Linux 6.5 + Oracle Database 11gR2 (Enteprise Edition) setup. Does not include the DB11g binary. You need to download that from the official site beforehand.

Download

Download the database binary (11.2.0) from below. Unzip to the subdirectory name "database".

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  • linux.x64_11gR2_database_1of2.zip
  • linux.x64_11gR2_database_2of2.zip

Clone this repository to the local directory. Move the "database" directory to the same folder.

$ git clone https://github.com/gcusnieux/docker-oracle11g
$ cd docker-oracle11g

Image build and container install

Pull the Oracle Linux 6.5 Docker image from the Docker Hub repository.

Image was created in the following way:

  • use official centos:centos6 image
  • convert into Oracle Linux 6.5 https://linux.oracle.com/switch/centos/
  • fix locale warning
  • install oracle-rdbms-server-11gR2-preinstall
  • create install directories
  • add ORACLE_XX environment variables
  • install ssh server
$ sudo docker build -t gcusnieux/oracle11g .
   
$ sudo docker run -d -p 0.0.0.0:2222:22 -v /$path/docker-oracle11g:/shared -e ROOT_PASS="mySshPassword" -t gcusnieux/oracle

DB Install

Install Database.

$ ssh -p 2222 root@0.0.0.0

bash-4.1# su - oracle

[oracle@localhost ~]$ /shared/database/runInstaller -silent -ignorePrereq -responseFile /shared/db_install.rsp

Show the log file... 

[oracle@localhost ~]$ exit

bash-4.1# /opt/oraInventory/orainstRoot.sh
bash-4.1# /opt/oracle/product/11.2.0/dbhome_1/root.sh

bash-4.1# exit

$ sudo docker restart <CONTAINER_ID>

Create listener using netca.

$ ssh -p 2222 root@0.0.0.0

bash-4.1# su - oracle

[oracle@localhost ~]$ export DISPLAY=hostname:0.0
[oracle@localhost ~]$ netca -silent -responseFile /shared/database/response/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /shared/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /opt/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

Create Database.

[oracle@localhost ~]$ dbca -silent -createDatabase -responseFile /shared/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

Test connection.

[oracle@localhost ~]$ sqlplus system/oracle@localhost:1521/orcl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages