-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Script to create Oracle XE slim images #1534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: marcelo-ochoa <[email protected]>
I notice you called this PR "Oracle XE slim image" but the actual Dockerfile is for Enterprise 18.3. Can you clarify that? |
Avi: |
I would suggest splitting this PR into two: one for the Oracle XE slim image and another one for dNFS support for Oracle EE 18.3/19.3. |
I would also highly recommend creating a branch for each of these and squashing your commits for each feature prior to submitting the separated PRs. |
Deleted samples on Oracle dNFS support
Ready, dNFS samples in other PR soon |
Included in #1666 |
The idea is to provide an slim version of latest Oracle XE Docker image image only with binaries and the ability to recreate a fresh Oracle instance from golden images in RMAN compressed full backup format.
Once of mainly motivation of smaller image size and faster creation time is to have a Docker image ready to be used in CI/CD pipelines which requires a fresh RDBMS for unit testing, also an slim image will reduce the network traffic between the CI/CD testing server and the private/public registry hosting the slim image.
Comparison results using this new image:
Image size: 30% of the original (8.52Gb -> 2.61Gb)
DB Creation time, 3x faster:
Docker image creation process uses multi-stage build and a modified script shared by Gerald Venzl and Jacek Gebal to cleanup non necessary stuff.
To get a golden image file either in format tar, tar.gz an RMAN directory with a setup script could be used in conjunction with oracle:18.4.0 image as:
$ docker
run -ti --rm --name freshdb -v /home/setup:/opt/oracle/scripts/setup -v /run/shm:/dev/shm oracle/database:18.4.0-xedirectory /home/setup having:
once the log output shows "DATABASE IS READY TO USE!" setup directory will have a golden image DB as RMAN format which will be passed as setup directory for oracle/database:18.4.0-xe-slim image or packaged as .tar or .tar.gz file format, here the content of full backup directory:
Make sure that /home/setup is owned by Oracle (54321:54321) in order to get RMAN working.
To pack RMAN content as init-db.tar.gz just use:
PD: This PR also included Dockerfile.nfs files as example of how to use Oracle dNFS backup file-system for datafiles.