Step 2: Building Oracle JRE Image

Before we can build the Oracle JRE image, make sure you completed the Step 1: Preparing your Environment.

Oracle provides a variety of Docker images for deploying Oracle Java and Oracle WebLogic. These images build and extend an Oracle Linux 7 docker image.

 

Clone the Oracle Docker Repo

 

To get started let’s first go ahead and clone the Oracle Github repo using git. I will be doing this in my user’s home directory. This will take some time as it is rather quite large.

 

 

 

Cloning the repo will create a local directory named docker-images. Check out the various projects that Oracle is currently supporting on Docker by looking through the docker-images directory.

 

Download Oracle JRE 8

The Oracle Github repo only contains docker files and helper scripts for building the actual images – it does NOT contain the actual binaries. These need to be downloaded separately from oracle.com.

Before we can build the JRE docker image, we need to download Oracle JRE 8 from oracle.com. Guidance and directions for downloading Oracle JRE are located in the docker-images/OracleJava/README.md.

View the contents of this file and follow the instructions for downloading Oracle JRE 8 and building the image.

Once you’ve downloaded Oracle JRE 8, place it in docker-images/OracleJava/java-8 or docker-images/OracleJava/windows-java-8 depending on your OS.

 

Build Oracle JRE 8 Docker Image

 

Run the build.sh scripted located in the java-8 directory to build the Oracle JRE 8 docker image.

 

 

You can verify the image was built by running ‘docker images’ :

 

 

You can see here from the output above that I have 3 docker images.  The hello-world image was created when I ran the docker hello-world container to verify my docker installation.  The oracle/serverjre was explicitly created when I ran the build.sh script earlier. The oraclelinux image was implicitly created when I built the Oracle JRE image.

 

Yay, we built a docker image for Oracle JRE.  We can now use this image any time we need to install Java for running Weblogic.

 

Let’s move on to Step 3: Building the WebLogic Docker Image

Step 2: Building Oracle JRE Image
Show Buttons
Hide Buttons