Offline Updating WebLogic Images using Oracle WebLogic Image Tool

Posted by Dirk Nachbar on Thursday, June 27, 2019 with No comments
This is next article about the Oracle WebLogic Image Tool, in which I will show you, how to update an existing Oracle WebLogic Server Image in an offline environment (no access to the internet).

The previous articles can be found under:

Let's say you have a Docker image with Oracle WebLogic Server plus PSU April 2019 (, in my environment called oracle/wls_new:1.0, and you want to update your Docker Image with the patch 29921455 (CVE-2019-2729

Just download the Patch 29921455 for the release and copy the Zip File to your target server, assuming to /work/software. The only tricky part here is to provide the correct format for the parameter --patchID for the command cache addPatch of the imagetool. The Patch is 29921455, but this Patch ID exists for multiple Oracle WebLogic Releases (e.g., So you need to define your --patchID as <PatchNumber>_<WebLogicRelease>.
So for the shown example 29921455_12.

$ docker images | grep oracle/wls_new
oracle/wls_new         1.0                        dad1b3068c40        2 hours ago         1.22GB

$ cd <Path to your imagetool bin directory>

# Source the
$ . ./

# Add the Patch to the imagetool cache
$ imagetool cache addPatch --patchId=29921455_12. --path=/work/software/
[2019-06-27 13:02:28] [] [INFO   ] adding key 29921455_12. 
[2019-06-27 13:02:28] [] [INFO   ] adding key 29921455_12. 
[2019-06-27 13:02:28] [] [INFO   ] Added Patch entry 29921455_12. for wls

# Check if the Patch was correctly added to the imagetool cache
$ imagetool cache listItems
Cache contents

As you can see, the patch 29921455 was added to the imagetool cache as entry id "29921455_12.".

Now we can update the existing Docker image. In my environment the Docker image is called oracle/wls_new:1.0. My new target image should be oracle/wls_new:2.0 and should contain the patch 29921455.
For this you need to execute the imagetool with the command "update", declare the source image (--fromImage) and the target image (--tag) and reference the patch to be applied (--patches). For the option "--patches" you have to use the cache entry with which you added the patch to the imagetool cache. In my example "29921455_12.".

$ imagetool update --fromImage oracle/wls_new:1.0 --tag oracle/wls_new:2.0 --patches 29921455_12.
[2019-06-27 13:17:25] [] [INFO   ] tmp directory in for docker run: /home/din/wlsimgbuilder_temp1812783530686130006 
[2019-06-27 13:17:32] [] [INFO   ] OPatch patch number 28186730 cached file /home/din/cache/ version 
[2019-06-27 13:17:32] [] [INFO   ] ID="ol" 
[2019-06-27 13:17:32] [] [INFO   ] OPATCH_VERSION= 
[2019-06-27 13:17:32] [] [INFO   ] WLS_VERSION= 
[2019-06-27 13:17:32] [] [INFO   ] ORACLE_HOME=/u01/oracle 
[2019-06-27 13:17:32] [] [INFO   ] VERSION_ID="7.6" 
. . .
. . .
Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.

OPatch succeeded.
Removing intermediate container c7487cd7ea8b
 ---> 6669bd543ace
Successfully built 6669bd543ace
Successfully tagged oracle/wls_new:2.0

# Lets check
$ docker images | grep oracle/wls_new
oracle/wls_new         2.0                        6669bd543ace        15 minutes ago      1.35GB
oracle/wls_new         1.0                        dad1b3068c40        2 hours ago         1.22GB

# Get inside the new Docker Image and check if the patch was applied correctly
$ docker run --rm -it oracle/wls_new:2.0 /bin/bash
[oracle@0eae36070e05 oracle]$ cd OPatch
[oracle@0eae36070e05 OPatch]$ ./opatch lsinventory
. . .
. . .
Local Machine Information::
Hostname: 0eae36070e05
ARU platform id: 226
ARU platform description:: Linux x86-64

Interim patches (6) :

Patch  29921455     : applied on Thu Jun 27 11:17:56 GMT 2019
Unique Patch ID:  22975494
Patch description:  "One-off"
   Created on 18 Jun 2019, 13:22:28 hrs PST8PDT
   Bugs fixed:
   This patch overlays patches:
   This patch needs patches:
   as prerequisites
. . .
. . .
OPatch succeeded.
[oracle@0eae36070e05 OPatch]$ exit

Now we have a new Docker image which was build as oracle/wls_new:2.0 and it contains the patch 29921455.