Base images


Creating or obtaining WebLogic Docker images

You will need Docker images to run your WebLogic domains in Kubernetes. There are two main options available:

  • Use a Docker image which contains the WebLogic Server binaries but not the domain, or
  • Use a Docker image which contains both the WebLogic Server binaries and the domain directory.

If you want to use the first option, you will need to obtain the standard WebLogic Server image from the Oracle Container Registry, see here; this image already contains the mandatory patches applied as described in this section. If you want to use additional patches, you can customize that process to include additional patches.

If you want to use the second option, which includes the domain directory inside the Docker image, then you will need to build your own Docker images as described in this section.

Setting up secrets to access the Oracle Container Registry

This version of the operator requires WebLogic Server plus patch 29135930; the standard image,, already includes this patch pre-applied.

In order for Kubernetes to obtain the WebLogic Server Docker image from the Oracle Container Registry (OCR), which requires authentication, a Kubernetes secret containing the registry credentials must be created. To create a secret with the OCR credentials, issue the following command:

$ kubectl create secret docker-registry SECRET_NAME \
  -n NAMESPACE \ \
  --docker-username=YOUR_USERNAME \
  --docker-password=YOUR_PASSWORD \

In this command, replace the uppercase items with the appropriate values. The SECRET_NAME will be needed in later parameter files. The NAMESPACE must match the namespace where the first domain will be deployed, otherwise, Kubernetes will not be able to find it.

It may be preferable to manually pull the image in advance, on each Kubernetes worker node, as described in the next section. If you choose this approach, you do not require the Kubernetes secret.

Obtaining standard images from the Oracle Container Registry

The Oracle Container Registry contains images for licensed commercial Oracle software products that you may use in your enterprise. To access the Oracle Registry Server, you must have an Oracle Single Sign-On (SSO) account. The Oracle Container Registry provides a web interface that allows an administrator to authenticate and then to select the images for the software that your organization wishes to use. Oracle Standard Terms and Restrictions terms must be agreed to via the web interface. After the Oracle Standard Terms and Restrictions have been accepted, you can pull images of the software from the Oracle Container Registry using the standard Docker pull command.

To pull an image from the Oracle Container Registry, in a web browser, navigate to and log in using the Oracle Single Sign-On authentication service. If you do not already have SSO credentials, at the top of the page, click the Sign In link to create them.

Use the web interface to accept the Oracle Standard Terms and Restrictions for the Oracle software images that you intend to deploy. Your acceptance of these terms is stored in a database that links the software images to your Oracle Single Sign-On login credentials.

The Oracle Container Registry provides a WebLogic Server Docker image, which already has the necessary patches applied, and the Oracle WebLogic Server image, which does not require any patches.

First, you will need to log in to the Oracle Container Registry:

$ docker login

Then, you can pull the image with this command:

$ docker pull

If desired, you can:

  • Check the WLS version with docker run sh -c 'source $ORACLE_HOME/wlserver/server/bin/ > /dev/null 2>&1 && java weblogic.version'

  • Check the WLS patches with docker run sh -c '$ORACLE_HOME/OPatch/opatch lspatches'

Additional information about using this image is available on the Oracle Container Registry.

Creating a custom image with patches applied

The Oracle WebLogic Server Kubernetes Operator and WebLogic Server image requires patch 29135930. This patch has some prerequisite patches that will also need to be applied. To create and customize the WebLogic Server image, and apply the required patches, use the WebLogic Image Tool.

To use the Image Tool, follow the Setup instructions and Quick Start Guide.

To build the WebLogic Server image and apply the patches:

  1. Add the Server JRE and the WebLogic Server installer to the cache command.

    $ imagetool cache addInstaller \
    --type=jdk \
    --version=8u241 \
    $ imagetool cache addInstaller \
    --type=wls \
    --version= \
  2. Use the Create Tool to build the image and apply the patches.

    For the Create Tool to download the patches, you must pass in your My Oracle Support credentials.

    $ imagetool create \
    --tag=weblogic: \
    --type=wls \
    --version= \
    --jdkVersion=8u241 \
    -–patches=29135930_12.,27117282_12. \ \
  3. After the tool creates the image, verify that the image is in your local repository:

    $ docker images

Creating a custom image with your domain inside the image

You can also create a Docker image with the WebLogic domain inside the image. Samples are provided that demonstrate how to create the image using:

In these samples, you will see a reference to a “base” or FROM image. You should use an image with the mandatory patches installed as this base image. This image could be either the standard pre-patched image or an image you created using the instructions above.

Oracle recommends that Docker images containing WebLogic domains be kept in a private repository.