-
Notifications
You must be signed in to change notification settings - Fork 5
Create Upgrade Images
Dockerfile.Upgrade
creates an image with an OS image suitable for running both a source and target version of a database, as well as source and target homes and (optionally) adds Oracle's pre-upgrade and AutoUpgrade JAR files.
Running the image starts DBCA to create a source database as normal. When DBCA completes the database can be upgraded to the target version, using the target home directory.
Populate the VERSION/install/*
directories for both the source and target version as you would normally.
Copy the pre-upgrade and/or AuotUpgrade JAR files to the upgrade/
directory.
Build a default image, with an Oracle 12.1.0.2 database as the source and an Oracle 19.9.0 database as the target using the following command:
docker build -t <IMAGE_NAME> -f Dockerfile.Upgrade .
To use different versions, edit Dockerfile.Upgrade
and change the ORACLE_VERSION and TARGET_VERSION, or supply the values to the build:
docker build --force-rm=true --no-cache=true \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg ORACLE_VERSION=<source version> \
--build-arg TARGET_VERSION=<target_version> \
-t <IMAGE_NAME> -f Dockerfile.Upgrade .
The major differences found in the upgrade image are:
- An extended environment based on the preinstall RPM of both the source and target versions
- Presence of the target version
ORACLE_HOME
- Two additional environment variables:
-
TARGET_VERSION
- The target database version -
TARGET_HOME
- The path to the new, target database home
-
- Files and tools present in the
upgrade/
directory during the build are copied toSCRIPTS_DIR
(default:/opt/scripts
) - Port 8080 is exposed to allow AutoUpgrade's
status.html
to be served