How to Install Oracle 11g (EE) on Docker

This article represents instructions on how to install & configure Oracle 11g Database (Enterprise Edition) on Docker.

Well, I could have lived with installing Oracle 11g express edition, had I have the requirement of testing my application with Oracle database for single user. The primary reason for installing Oracle enterprise edition was to test the high availability using Oracle Data Guard solution. As we may knowing that Oracle Data Guard does not come with Oracle XE Database, thus, it becomes mandatory to work with Oracle EE Database edition which comes bundled with Data Guard solution.

The primary challenge in installing Oracle EE database on Docker is the disk space problem the installation runs into. To get around that problem, I would suggest you to read the page below and configure your docker environment appropriately.

Let’s get started with installing and configuration of oracle database.

  1. Download the following Oracle 12c docker image from The image consist of three steps. Each step is a folder consisting of a Dockerfile and a couple of scripts which would be referred when Dockerfile gets executed.
  2. Download the Oracle 11G Database: One would be required to download the oracle linux 11g file from Oracle website (this Oracle 11G Linux Download page)
  3. Configure Boot2docker for greater Disk Space: Before getting started, you would want to take care of “disk space” issue which you would eventually run into, if you do not take care. For this purpose, one would require to configure boot2docker to allow image of larger size. This page, consists of instructions to configure boot2docker. Based on the instructions on the page, I increased the disksize to 100000.
  4. Customize the image for Oracle 11G: As the image is for building Oracle 12c (EE) database, one would require to make few changes to the Dockerfiles and scripts to make it work for Oracle 11g (EE) database. Following is required to be done.
    • Place the downloaded Oracle 11g zipped files (two files) in step1 folder.
    • Go to step1/Dockerfile, and change the oracle downloaded zip file names.
    • In step1 folder, change the db_install.rsp to 11.2.0 compatible db_install.rsp file. One could get a sample response file for 11g from web.
    • In step2 folder, change the step2/Dockerfile, step2/create and step2/initORCL.ora such that 12.1.0 is replaced with 11.2.0
    • Once done with above, go ahead and build and commit step 1, step2 and step 3 as per the instructions on the page.
    • You are all set to run the Oracle DB.
  5. Run the image into Docker Container: Individual oracle DB instance (docker run –privileged -ti -d -P –name primary -v /c/Users:/mnt/Users  oracle-12c:step3 /bin/bash). This would expose 1521, 5050, 8080 on random ports which could be used to connect to database. As a result of installation, “start” script is placed in “/tmp” folder. Thus, every time you start and attach the docker, execute the following command, “/tmp/start” to start the Oracle DB instance. In case, you want to start in the background, you could use following command: “nohup /tmp/start &”.
  6. Multiple oracle DB instance requiring to connect each other (docker run –privileged -ti -d -P –name standby -v /c/Users:/mnt/Users –link primary:primary oracle-12c:step3 /bin/bash)

Hope the instructions above would help you install, configure and run with Oracle 11g (EE) database on your laptop. Let me know if you needed any help.

Ajitesh Kumar

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.
Posted in Virtualization. Tagged with , , .

2 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *