Building Oracle Docker image

First, this post is for building Oracle RDBMS image for testing purpose due is not officially supported by Oracle yet.

There are two great post for doing similar task by Rodrigo Jorge and Mahmoud Hatem giving me the starting point for making these scripts, but none of above solutions works with Docker.

The point is that for the initial Rodrigo's idea as Hatem set many people doesn't have access to an Oracle Cloud account for downloading a patched library and in case of the solution by Hatem it doesn't work on Docker environment because is not possible to install kernel modules at the kernel running your binary.

My solution is using a linker trick to replace a library call, usually is used for System's call replacement (LD_PRELOAD variable), but in this case is to replace a library function call. The replacement is for the function ksz_exadata_feature_on which resides at the library libserver18.a the linker flag is placed at ldflags file (added -wrap=ksz_exadata_feature_on -lexadata_wrap) which means that any call to a function ksz_exadata_feature_on will be replaced by __wrap_ksz_exadata_feature_on which resides at the lib, compiled from exadata_wrap.c sources.

OK, lets build the Oracle RDBMS Docker image, first clone or download my branch of Oracle Repository, change to the directory docker-images/OracleDatabase/dockerfiles and run this command:

Build command for RDBMS Docker image

Remember that above command assume that you already downloaded your V974953– and it resides at directory. script will take a long time to build the new image, once it ready your image will look like:

docker build command's output
list of Oracle RDBMS local images

Once you have the image ready you can start your 18c Database running:

docker run sample for using 18c Docker image

flags explanation are:

First execution of above Docker run command will create a RDBMS instance located at /home/data/db/test18c local directory, and log output end with:

log output showing successful Database creation

I didn't make a test on Windows or Mac, but by definition above image will run without any problem on any Docker's supported platform. Have fun using latest 18c Oracle Release, public version for on-premise installation is planning for July 2018.

Bonus EM's sample capture sample:

Oracle EM running in my notebook

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store