If you have access to the My Oracle Support (MOS), and there is a need to build a new image with a patch (bundle or interim), it is recommended to use the WebLogic Image Tool to build an Oracle SOA Suite image for production deployments.
Using the WebLogic Image Tool, you can create a new Oracle SOA Suite Docker image (can include patches as well) or update an existing image with one or more patches (bundle patch and interim patches).
Recommendations:
- Use create for creating a new Oracle SOA Suite Docker image either:
- without any patches
- or, containing the Oracle SOA Suite binaries, bundle patch and interim patches. This is the recommended approach if you have access to the Oracle SOA Suite patches because it optimizes the size of the image.
- Use update for patching an existing Oracle SOA Suite Docker image with a single interim patch. Note that the patched image size may increase considerably due to additional image layers introduced by the patch application tool.
Verify that your environment meets the following prerequisites:
To set up the WebLogic Image Tool:
Create a working directory and change to it. In these steps, this directory is imagetool-setup
.
$ mkdir imagetool-setup
$ cd imagetool-setup
Download the latest version of the WebLogic Image Tool from the releases page.
Unzip the release ZIP file to the imagetool-setup
directory.
Execute the following commands to set up the WebLogic Image Tool on a Linux environment:
$ cd imagetool-setup/imagetool/bin
$ source setup.sh
To validate the setup of the WebLogic Image Tool:
Enter the following command to retrieve the version of the WebLogic Image Tool:
$ imagetool --version
Enter imagetool
then press the Tab key to display the available imagetool
commands:
$ imagetool <TAB>
cache create help rebase update
The WebLogic Image Tool creates a temporary Docker context directory, prefixed by wlsimgbuilder_temp
, every time the tool runs. Under normal circumstances, this context directory will be deleted. However, if the process is aborted or the tool is unable to remove the directory, it is safe for you to delete it manually. By default, the WebLogic Image Tool creates the Docker context directory under the user’s home directory. If you prefer to use a different directory for the temporary context, set the environment variable WLSIMG_BLDDIR
:
$ export WLSIMG_BLDDIR="/path/to/buid/dir"
The WebLogic Image Tool maintains a local file cache store. This store is used to look up where the Java, WebLogic Server installers, and WebLogic Server patches reside in the local file system. By default, the cache store is located in the user’s $HOME/cache
directory. Under this directory, the lookup information is stored in the .metadata
file. All automatically downloaded patches also reside in this directory. You can change the default cache store location by setting the environment variable WLSIMG_CACHEDIR
:
$ export WLSIMG_CACHEDIR="/path/to/cachedir"
Creating an Oracle SOA Suite Docker image using the WebLogic Image Tool requires additional container scripts for Oracle SOA Suite domains.
Clone the docker-images repository to set up those scripts. In these steps, this directory is DOCKER_REPO
:
$ cd imagetool-setup
$ git clone https://github.com/oracle/docker-images.git
Copy the additional WebLogic Image Tool build files from the operator source repository to the imagetool-setup
location:
$ mkdir -p imagetool-setup/docker-images/OracleSOASuite/imagetool/12.2.1.4.0
$ cd imagetool-setup/docker-images/OracleSOASuite/imagetool/12.2.1.4.0
$ cp -rf ${WORKDIR}/imagetool-scripts/* .
Note: If you want to create the image continue with the following steps, otherwise to update the image see update an image.
After setting up the WebLogic Image Tool and required build scripts, follow these steps to use the WebLogic Image Tool to create
a new Oracle SOA Suite Docker image.
You must download the required Oracle SOA Suite installation binaries and patches as listed below from the Oracle Software Delivery Cloud and save them in a directory of your choice. In these steps, this directory is download location
.
The installation binaries and patches required for release 23.1.2 are:
JDK:
Fusion Middleware Infrastructure installer:
Oracle SOA Suite installers:
In this release, Oracle B2B is not supported to be configured, but the installer is required for completeness.
Fusion Middleware Infrastructure patches:
Oracle SOA Suite and Oracle Service Bus patches
The following files in the code repository location <imagetool-setup-location>/docker-images/OracleSOASuite/imagetool/12.2.1.4.0
are used for creating the image:
additionalBuildCmds.txt
buildArgs
In the buildArgs
file, update all occurrences of %DOCKER_REPO%
with the docker-images
repository location, which is the complete path of <imagetool-setup-location>/docker-images
.
For example, update:
%DOCKER_REPO%/OracleSOASuite/imagetool/12.2.1.4.0/
to:
<imagetool-setup-location>/docker-images/OracleSOASuite/imagetool/12.2.1.4.0/
Similarly, update the placeholders %JDK_VERSION%
and %BUILDTAG%
with appropriate values.
Update the response file <imagetool-setup-location>/docker-images/OracleFMWInfrastructure/dockerfiles/12.2.1.4/install.file
to add the parameter INSTALL_TYPE="Fusion Middleware Infrastructure"
in the [GENERIC]
section.
Add a JDK package to the WebLogic Image Tool cache:
$ imagetool cache addInstaller --type jdk --version 8u361 --path <download location>/jdk-8u361-linux-x64.tar.gz
Add the downloaded installation binaries to the WebLogic Image Tool cache:
$ imagetool cache addInstaller --type fmw --version 12.2.1.4.0 --path <download location>/fmw_12.2.1.4.0_infrastructure.jar
$ imagetool cache addInstaller --type soa --version 12.2.1.4.0 --path <download location>/fmw_12.2.1.4.0_soa.jar
$ imagetool cache addInstaller --type osb --version 12.2.1.4.0 --path <download location>/fmw_12.2.1.4.0_osb.jar
$ imagetool cache addInstaller --type b2b --version 12.2.1.4.0 --path <download location>/fmw_12.2.1.4.0_b2bhealthcare.jar
Add the downloaded OPatch patch to the WebLogic Image Tool cache:
$ imagetool cache addEntry --key 28186730_13.9.4.2.11 --value <download location>/p28186730_1394211_Generic.zip
Append the --opatchBugNumber
flag and the OPatch patch key to the create
command in the buildArgs
file:
--opatchBugNumber 28186730_13.9.4.2.11
Add the downloaded product patches to the WebLogic Image Tool cache:
$ imagetool cache addEntry --key 28186730_13.9.4.2.11 --value <download location>/p28186730_1394211_Generic.zip
$ imagetool cache addEntry --key 30741105_12.2.1.4.0 --value <download location>/p30741105_122140_Generic.zip
$ imagetool cache addEntry --key 33639718_12.2.1.4.0 --value <download location>/p33639718_122140_Linux-x86-64.zip
$ imagetool cache addEntry --key 31713053_12.2.1.4.0 --value <download location>/p31713053_122140_Linux-x86-64.zip
$ imagetool cache addEntry --key 31857456_12.2.1.4.0 --value <download location>/p31857456_122140_Generic.zip
$ imagetool cache addEntry --key 32121987_12.2.1.4.0 --value <download location>/p32121987_122140_Generic.zip
$ imagetool cache addEntry --key 32720458_12.2.1.4.0 --value <download location>/p32720458_122140_Generic.zip
$ imagetool cache addEntry --key 33093748_12.2.1.4.0 --value <download location>/p33093748_122140_Generic.zip
$ imagetool cache addEntry --key 33404495_12.2.1.4.0 --value <download location>/p33404495_122140_Generic.zip
$ imagetool cache addEntry --key 34839859_12.2.1.4.0 --value <download location>/p34839859_122140_Generic.zip
$ imagetool cache addEntry --key 34845927_12.2.1.4.0 --value <download location>/p34845927_122140_Generic.zip
$ imagetool cache addEntry --key 33950717_12.2.1.4.0 --value <download location>/p33950717_122140_Generic.zip
$ imagetool cache addEntry --key 34944256_12.2.1.4.0 --value <download location>/p34944256_122140_Generic.zip
$ imagetool cache addEntry --key 34824004_12.2.1.4.0 --value <download location>/p34824004_122140_Generic.zip
$ imagetool cache addEntry --key 34883826_12.2.1.4.0 --value <download location>/p34883826_122140_Generic.zip
$ imagetool cache addEntry --key 34879707_12.2.1.4.0 --value <download location>/p34879707_122140_Generic.zip
$ imagetool cache addEntry --key 34065178_12.2.1.4.0 --value <download location>/p34065178_122140_Generic.zip
$ imagetool cache addEntry --key 34801809_12.2.1.4.0 --value <download location>/p34801809_122140_Generic.zip
$ imagetool cache addEntry --key 34542329_12.2.1.4.0 --value <download location>/p34542329_122140_Generic.zip
$ imagetool cache addEntry --key 34765492_12.2.1.4.0 --value <download location>/p34765492_122140_Generic.zip
$ imagetool cache addEntry --key 34292037_12.2.1.4.0 --value <download location>/p34292037_122140_Generic.zip
Append the --patches
flag and the product patch keys to the create
command in the buildArgs
file. The --patches
list must be a comma-separated collection of patch --key
values used in the imagetool cache addEntry
commands above.
Sample --patches
list for the product patches added in to the cache:
--patches 30741105_12.2.1.4.0,33639718_12.2.1.4.0,31713053_12.2.1.4.0,31857456_12.2.1.4.0,32121987_12.2.1.4.0,32720458_12.2.1.4.0,33093748_12.2.1.4.0,33404495_12.2.1.4.0,34839859_12.2.1.4.0,34845927_12.2.1.4.0,33950717_12.2.1.4.0,34944256_12.2.1.4.0,34824004_12.2.1.4.0,34883826_12.2.1.4.0,34879707_12.2.1.4.0,34065178_12.2.1.4.0,34801809_12.2.1.4.0,34542329_12.2.1.4.0,34765492_12.2.1.4.0,34292037_12.2.1.4.0
Example buildArgs
file after appending the OPatch patch and product patches:
create
--jdkVersion 8u361
--type soa_osb_b2b
--version 12.2.1.4.0
--tag oracle/soasuite:12.2.1.4.0
--pull
--fromImage ghcr.io/oracle/oraclelinux:7-slim
--chown oracle:root
--additionalBuildCommands <imagetool-setup-location>/docker-images/OracleSOASuite/imagetool/12.2.1.4.0/additionalBuildCmds.txt
--additionalBuildFiles <imagetool-setup-location>/docker-images/OracleSOASuite/dockerfiles/12.2.1.4/container-scripts
--installerResponseFile <imagetool-setup-location>/docker-images/OracleFMWInfrastructure/dockerfiles/12.2.1.4/install.file,<imagetool-setup-location>/docker-images/OracleSOASuite/dockerfiles/12.2.1.4/install/soasuite.response,<imagetool-setup-location>/docker-images/OracleSOASuite/dockerfiles/12.2.1.4/install/osb.response,<imagetool-setup-location>/docker-images/OracleSOASuite/dockerfiles/12.2.1.4/install/b2b.response
--patches 30741105_12.2.1.4.0,33639718_12.2.1.4.0,31713053_12.2.1.4.0,31857456_12.2.1.4.0,32121987_12.2.1.4.0,32720458_12.2.1.4.0,33093748_12.2.1.4.0,33404495_12.2.1.4.0,34839859_12.2.1.4.0,34845927_12.2.1.4.0,33950717_12.2.1.4.0,34944256_12.2.1.4.0,34824004_12.2.1.4.0,34883826_12.2.1.4.0,34879707_12.2.1.4.0,34065178_12.2.1.4.0,34801809_12.2.1.4.0,34542329_12.2.1.4.0,34765492_12.2.1.4.0,34292037_12.2.1.4.0
Note: In the
buildArgs
file:
--jdkVersion
value must match the--version
value used in theimagetool cache addInstaller
command for--type jdk
.--version
value must match the--version
value used in theimagetool cache addInstaller
command for--type soa
.--pull
always pulls the latest base Linux imageoraclelinux:7-slim
from the Docker registry. This flag can be removed if you want to use the Linux imageoraclelinux:7-slim
, which is already available on the host where the SOA image is created.
Refer to this page for the complete list of options available with the WebLogic Image Tool create
command.
Create the Oracle SOA Suite image:
$ imagetool @<absolute path to buildargs file>
Note: Make sure that the absolute path to the
buildargs
file is prepended with a@
character, as shown in the example above.
For example:
$ imagetool @<imagetool-setup-location>/docker-images/OracleSOASuite/imagetool/12.2.1.4.0/buildArgs
Check the created image using the docker images
command:
$ docker images | grep soasuite
After setting up the WebLogic Image Tool and required build scripts, use the WebLogic Image Tool to update
an existing Oracle SOA Suite Docker image:
Enter the following command to add the OPatch patch to the WebLogic Image Tool cache:
$ imagetool cache addEntry --key 28186730_13.9.4.2.11 --value <download location>/p28186730_1394211_Generic.zip
Execute the imagetool cache addEntry
command for each patch to add the required patch(es) to the WebLogic Image Tool cache. For example, to add patch p30761841_122140_Generic.zip
:
$ imagetool cache addEntry --key=30761841_12.2.1.4.0 --value <downloaded-patches-location>/p30761841_122140_Generic.zip
Provide the following arguments to the WebLogic Image Tool update
command:
–-fromImage
- Identify the image that needs to be updated. In the example below, the image to be updated is soasuite:12.2.1.4
.–-patches
- Multiple patches can be specified as a comma-separated list.--tag
- Specify the new tag to be applied for the image being built.Refer here for the complete list of options available with the WebLogic Image Tool update
command.
Note: The WebLogic Image Tool cache should have the latest OPatch zip. The WebLogic Image Tool will update the OPatch if it is not already updated in the image.
Check the built image using the docker images
command:
$ docker images | grep soasuite
soasuite 12.2.1.4-30761841
2ef2a67a685b About a minute ago 4.84GB
$
For test and development purposes, you can create an Oracle SOA Suite image using the Dockerfile. Consult the README file for important prerequisite steps, such as building or pulling the Server JRE Docker image, Oracle FMW Infrastructure Docker image, and downloading the Oracle SOA Suite installer and bundle patch binaries.
A prebuilt Oracle Fusion Middleware Infrastructure image, container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4
, is available at container-registry.oracle.com
. We recommend that you pull and rename this image to build the Oracle SOA Suite image.
$ docker pull container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4
$ docker tag container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4 oracle/fmw-infrastructure:12.2.1.4.0
Follow these steps to build an Oracle Fusion Middleware Infrastructure image, and then the Oracle SOA Suite image as a layer on top of that:
Make a local clone of the sample repository:
$ git clone https://github.com/oracle/docker-images
Build the oracle/fmw-infrastructure:12.2.1.4
image:
$ cd docker-images/OracleFMWInfrastructure/dockerfiles
$ sh buildDockerImage.sh -v 12.2.1.4 -s
This will produce an image named oracle/fmw-infrastructure:12.2.1.4
.
Tag the image as follows:
$ docker tag oracle/fmw-infrastructure:12.2.1.4 oracle/fmw-infrastructure:12.2.1.4.0
Download the Oracle SOA Suite installer from the Oracle Technology Network or e-delivery.
Note: Copy the installer binaries to the same location as the Dockerfile.
To build the Oracle SOA Suite image with patches, you must download and drop the patch zip files (for example, p29928100_122140_Generic.zip
) into the patches/
folder under the version that is required. For example, for 12.2.1.4.0
the folder is 12.2.1.4/patches
. Similarly, to build the image by including the OPatch patch, download and drop the OPatch patch zip file (for example, p28186730_1394211_Generic.zip
) into the opatch_patch/
folder.
Create the Oracle SOA Suite image by running the provided script:
$ cd docker-images/OracleSOASuite/dockerfiles
$ ./buildDockerImage.sh -v 12.2.1.4 -s
The image produced will be named oracle/soasuite:12.2.1.4
. The samples and instructions assume the Oracle SOA Suite image is named soasuite:12.2.1.4
. You must rename your image to match this name, or update the samples to refer to the image you created.
$ docker tag oracle/soasuite:12.2.1.4 soasuite:12.2.1.4