⚠️ Docker image version 1.0 has a flaw! The user SYSTEM's password expires 03/05/2021. Upgrade to version 2.0 where the user SYSTEM's password never expires.
This repo provides a script to automate the process of creating a prebuilt oracle docker image.
Oracle offers an official enterprise database docker.
Using this official image requires users to agree to a click through license agreement.
Additionally, the database is not built until runtime, meaning that container startup takes approx. 10 minutes.
Oracle offers their own scripts to create an oracle database docker image in the oracle/docker-images GitHub repo under a Universal Permissive License.
Again, this process requires users to download installation binaries from oracle, and by doing so requires user to agree to a license agreement.
That was until oracle released the Oracle Database 18c XE binary under a free use license, which grants users a license to:
(b) redistribute unmodified Programs and Programs Documentation, under the terms of this License, provided that You do not charge Your end users any additional fees for the use of the Programs.
The oracle images created from using the scripts from the oracle/docker-images GitHub repo still create the database at runtime.
The script in this repository automates the process documented by oracle to create a database image with a pre-built database.
Clone this repo, navigate to the source directory and run the prebuild.sh
script.
git clone git@github.com:KyleAure/oracle-docker-images.git
cd oracle-docker-images/version1/src
./prebuild.sh
This script will do the following:
- Clone the
oracle/docker-images
git repo - Make necessary edits to the
buildDockerImage.sh
and18.4.0/Dockefile
files to create a prebuilt database image - Run the
buildDockerImage.sh
script to create a base image:oracle/database:18.4.0-xe
- Run the base image
oracle/database:18.4.0-xe
which will create the database. - Commit this container to a new image
oracle/database:18.4.0-xe-prebuilt
- Clean up the intermediary containers, and remove the
oracle/docker-images
repo.
docker pull kyleaure/oracle-18.4.0-xe-prebuilt
To push this image to a private dockerhub repository.
Create a private repository named:
<dockerhub-username>/oracle-18.4.0-xe-prebuilt
Then run the prebuild.sh
script with the push parameter.
# version is typically 1.0 or latest
./prebuild.sh -p -u <dockerhub-username> -v <dockerhub-version>