9.3 Updating an Image

Before updating an Oracle HTTP Server (OHS) image, make sure you have followed Setting Up the WebLogic Image Tool.

Note:

The container image to be patched must be loaded in the local docker images repository before attempting these steps. In the examples below the image oracle/ohs:14.1.2.0.0 is updated with an interim patch:
$ docker images

REPOSITORY                   TAG          IMAGE ID          CREATED             SIZE
oracle/ohs:14.1.2.0.0       14.1.2.0.0   b051804ba15f      3 months ago        3.68GB
The steps below show how to update an existing Oracle HTTP Server image with an interim patch:
  1. Download the required interim patch(es) and latest Opatch (28186730) from My Oracle Support. and save them in a directory of your choice.
  2. Add the OPatch patch to the WebLogic Image Tool cache, for example:
    imagetool cache addEntry --key 28186730_13.9.4.2.18 --value <downloaded-patches-location>/p28186730_1394218_Generic.zip
  3. 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 p6666666_141200_Generic.zip:

    Note:

    This is not a real patch number, it is used purely for an example.
    imagetool cache addEntry --key=6666666_14.1.2.141200 --value <downloaded-patches-location>/p6666666_141200_Generic.zip
  4. 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 oracle/ohs:14.1.2.0.0.
    • --patches - Multiple patches can be specified as a comma-separated list.
    • --tag - Specify the new tag to be applied for the image being built.
    For more information on the complete list of options available with the WebLogic Image Tool update command, see Update Image.

    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.
    For example:
    imagetool update --fromImage oracle/ohs:14.1.2.0.0  --tag=oracle/ohs-new:14.1.2.0.0 --patches=6666666_14.1.2.141200 --opatchBugNumber=28186730_13.9.4.2.18

    Note:

    If the command fails because the files in the image being upgraded are not owned by oracle:root, then add the parameter --chown <userid>:<groupid> to correspond with the values returned in the error.
  5. Check the built image using the docker images command:
    docker images | grep OHS
    The output will look similar to the following:
    REPOSITORY                        TAG          IMAGE ID        CREATED             SIZE
    oracle/ohs-new:14.1.2.0.0      14.1.2.0.0   78ccd1ad67eb    5 minutes ago       4.5GB
    oracle/ohs:14.1.2.0.0          14.1.2.0.0   b051804ba15f    3 months ago        3.68GB
  6. Run the following command to save the patched container image to a tar file:
    docker save -o <path>/<file>.tar <image>
    For example:
    docker save -o $WORKDIR/ohs-new14.1.2.tar oracle/ohs-new:14.1.2