|
| 1 | +# Oracle WebLogic Server on Docker |
| 2 | +================================= |
| 3 | +These Docker configurations have been used to create the Oracle WebLogic Server (WLS) image. Providing this WLS image facilitates the configuration and environment setup for DevOps users. This project includes the installation and creation of an empty WebLogic Server domain (an Administration Server only). These WLS 14.1.2.0 images are based on Oracle Linux and Oracle JDK 17 or Oracle JDK 21. |
| 4 | + |
| 5 | +**IMPORTANT**: We provide Dockerfiles as samples to build WebLogic images but this is _NOT_ a recommended practice. We recommend obtaining patched WebLogic Server images; patched images have the latest security patches. For more information, see [Obtaining, Creating, and Updating Oracle Fusion Middleware Images with Patches] (<https://docs.oracle.com/en/middleware/fusion-middleware/14.1.2/opatc/obtaining-creating-and-updating-oracle-fusion-middleware-images-patches.html>). |
| 6 | + |
| 7 | +The samples in this repository are for development purposes only. We recommend for production to use alternative methods, we suggest obtaining base WebLogic Server images from the [Oracle Container Registry](<https://oracle.github.io/weblogic-kubernetes-operator/userguide/base-images/ocr-images/>). |
| 8 | + |
| 9 | +Consider using the open source [WebLogic Image Tool](<https://oracle.github.io/weblogic-kubernetes-operator/userguide/base-images/custom-images/>) to create custom images, and using the open source [WebLogic Kubernetes Operator](<https://oracle.github.io/weblogic-kubernetes-operator/>) to deploy and manage WebLogic domains. |
| 10 | + |
| 11 | +The certification of Oracle WebLogic Server on Docker does not require the use of any file presented in this repository. The sample files in this repository are for development purposes, customers and users are welcome to use them as starters, and customize, tweak, or create from scratch, new scripts and Dockerfiles. |
| 12 | + |
| 13 | + |
| 14 | +## How to build and run |
| 15 | +This project offers sample Dockerfiles for Oracle WebLogic Server 14.1.2.0. It provides a Dockerfile for the distribution of WebLogic Server 14.1.2.0 with JDK 17, and a second Dockerfile for the distribution of WebLogic Server 14.1.2.0 with JDK 21. |
| 16 | + |
| 17 | +To assist in building the images, you can use the [`buildDockerImage.sh`](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage. |
| 18 | + |
| 19 | +The `buildDockerImage.sh` script is a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. |
| 20 | + |
| 21 | +### Building Oracle WebLogic Server Docker install images |
| 22 | +**IMPORTANT:** You must download the binary of Oracle WebLogic Server and put it in place (see `.download` files inside `dockerfiles/<version>`). WebLogic Server 14.1.2.0 supports both Java SE 17 or 21. |
| 23 | + |
| 24 | +If you want to run WebLogic Server on Oracle JDK 17, you must build the image by using the Dockerfile in [`../../../OracleJava/17`](<https://github.com/oracle/docker-images/tree/master/OracleJava/17>). If you want to run images of WebLogic based on the Oracle JDK 17 image, you must build the image by using the Dockerfile in [`../../../OracleJava/21`](<https://github.com/oracle/docker-images/tree/master/OracleJava/21>). |
| 25 | + |
| 26 | +Before you build, select the version and distribution for which you want to build an image, then download the required packages (see `.download` files) and locate them in the folder of your distribution version of choice. Then, from the `dockerfiles` folder, run the `buildDockerImage.sh` script as root. |
| 27 | + |
| 28 | + `$ sh buildDockerImage.sh` |
| 29 | + Usage: buildDockerImage.sh -v [version] [-d | -g | -m ] [-j] [-s] [-c] |
| 30 | + Builds a Docker Image for Oracle WebLogic. |
| 31 | + |
| 32 | + Parameters: |
| 33 | + -v: version to build. Required. |
| 34 | + Choose one of: 12.2.1.4 14.1.1.0 14.1.2.0 |
| 35 | + -d: creates image based on 'developer' distribution |
| 36 | + -g: creates image based on 'generic' distribution |
| 37 | + -j: choose the JDK to create a 12.2.1.4 (JDK '8'), 14.1.1.0 (JDK '8' or '11'), or 14.1.2.0 (JDK '17' or '21') image |
| 38 | + -m: creates image based on 'slim' distribution |
| 39 | + -c: enables Docker image layer cache during build |
| 40 | + -s: skips the MD5 check of packages |
| 41 | + |
| 42 | + * select one distribution only: -d, -g, or -m |
| 43 | + |
| 44 | + LICENSE UPL 1.0 |
| 45 | + |
| 46 | + Copyright (c) 2014, 2025, Oracle and/or its affiliates. |
| 47 | + |
| 48 | + |
| 49 | +**IMPORTANT:** The resulting images will have a single server domain (Administration Server only), by default. |
| 50 | + |
| 51 | + |
| 52 | + 1. To build the `14.1.2.0`image, from `dockerfiles`, call: |
| 53 | + |
| 54 | + `$ sh buildDockerImage.sh -v 14.1.2.0 -d -j 17` |
| 55 | + |
| 56 | + 2. Verify that you now have this image in place with: |
| 57 | + |
| 58 | + `$ docker images` |
| 59 | + |
| 60 | + If the WebLogic image is built extending Oracle JDK 17, then the built image will be called oracle/weblogic:14.1.2.0-17 |
| 61 | + If the WebLogic image is built extending Oracle JDK 21, then the built image will be called oracle/weblogic:14.1.2.0-21 |
| 62 | + |
| 63 | +### Running a single server domain from the image |
| 64 | +The WebLogic Server install image (built above) allows you to run a container with a single WebLogic Server domain. This makes it extremely simple to deploy applications and any resource the application might need. |
| 65 | + |
| 66 | +#### Providing the Administration Server user name and password |
| 67 | +The user name and password must be supplied in a `domain.properties` file located in a HOST directory that you will map at Docker runtime with the `-v` option to the image directory `/u01/oracle/properties`. The properties file enables the scripts to configure the correct authentication for the WebLogic Server Administration Server. |
| 68 | + |
| 69 | +The format of the `domain.properties` file is key=value pair: |
| 70 | + |
| 71 | + username=myadminusername |
| 72 | + password=myadminpassword |
| 73 | + |
| 74 | +**Note**: Oracle recommends that the `domain.properties` file be deleted or secured after the container and the WebLogic Server are started so that the user name and password are not inadvertently exposed. |
| 75 | + |
| 76 | +#### Start the container |
| 77 | +Start a container from the image created in step 1. |
| 78 | +You can override the default values of the following parameters during runtime with the `-e` option: |
| 79 | + |
| 80 | + * `ADMIN_NAME` (default: `AdminServer`) |
| 81 | + * `ADMIN_LISTEN_PORT` (default: `7001`) |
| 82 | + * `DOMAIN_NAME` (default: `base_domain`) |
| 83 | + * 'PRODUCTION_MODE (default: `dev`) |
| 84 | + * `ADMINISTRATION_PORT_ENABLED` (default: `false`) |
| 85 | + * `ADMINISTRATION_PORT` (default: `9002`) |
| 86 | + |
| 87 | +**NOTE**: For security, you want to set the domain mode to `production mode`. In WebLogic Server 14.1.2.0 a new `production mode` domain becomes by default a `secured production` mode domain. Secured production mode domains have more secure default configuration settings, for example the Administration port is enabled, all non-ssl listen ports are disabled, and all ssl ports are enabled. |
| 88 | + |
| 89 | +In this image we create a Development Mode domain by default, you can create a Production Mode domain (with Secured Production Mode disabled) by setting in the `docker run` command `PRODUCTION_MODE` to `prod` and set `ADMINISTRATION_PORT_ENABLED` to true. |
| 90 | +If you intend to run these images in production, then you should change the Production Mode to `production`. When you set the `DOMAIN_NAME`, the `DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME`. Please see the documentation [Administering Security for Oracle WebLogic Server](<https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/14.1.2/secmg/using-secured-production-mode.html#GUID-9ED2EF38-F763-4999-80ED-27A3FBCB9D7D>). |
| 91 | + |
| 92 | + |
| 93 | +Run a Development Mode domain: |
| 94 | + |
| 95 | + `$ docker run -d -p 7001:7001 -v `HOST PATH where the domain.properties file is`:/u01/oracle/properties -e DOMAIN_NAME=docker_domain -e ADMIN_NAME=docker-AdminServer oracle/weblogic:14.1.2.0-17` |
| 96 | + |
| 97 | +Run a Production Mode domain with Secured Mode disabled: |
| 98 | + |
| 99 | + `$ docker run -d -p 7001:7001 -p 9002:9002 -v `HOST PATH where the domain.properties file is`:/u01/oracle/properties -e PRODUCTION_MODE=prod -e ADMINISTRATION_PORT_ENABLED=true -e DOMAIN_NAME=docker_domain -e ADMIN_NAME=docker-AdminServer oracle/weblogic:14.1.2.0-17` |
| 100 | + |
| 101 | +**NOTE**: WebLogic Server 14.1.2.0 provides the WebLogic Remote Console, a lightweight, open source console that you can use to manage domain configurations of WebLogic Server Administration Servers or WebLogic Deploy Tooling (WDT). |
| 102 | +For details related to WDT metadata models, please see [documentation `About WebLogic Remote Console`] (<https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-remote-console/administer/introduction.html#WLSRC-GUID-C52DA76D-A7F2-4E7F-ABDA-499EB41372E5>). The WebLogic Remote Console replaces the retired WebLogic Administration Console. |
| 103 | + |
| 104 | +Run the WLS Remote Console : |
| 105 | + |
| 106 | +WebLogic Remote Console is available in two formats: |
| 107 | + |
| 108 | + * Desktop WebLogic Remote Console, a desktop application installed on your computer. |
| 109 | + * Hosted WebLogic Remote Console, a web application deployed to an Administration Server and accessed through a browser. |
| 110 | + |
| 111 | +Generally, the two formats have similar functionality, though the desktop application offers certain conveniences that are not possible when using a browser. The Desktop WebLogic Remote Console is best suited for monitoring WebLogic domains running in containers. |
| 112 | + |
| 113 | +1. Download the latest version of Desktop WebLogic Remote Console from the [WebLogic Remote Console GitHub Repository] (<https://github.com/oracle/weblogic-remote-console/releases>). Choose the appropriate installer for your operating system. |
| 114 | +2. Follow the typical process for installing applications on your operating system. |
| 115 | +3. Launch WebLogic Remote Console. |
| 116 | + |
| 117 | +You will need the ip.address of the Admin server container to later use to connect from the Remote Console |
| 118 | + |
| 119 | + `$ docker inspect --format '{{.NetworkSettings.IPAddress}}' <container-name>` |
| 120 | + |
| 121 | +4. Open the Providers drawer and click More ︙. |
| 122 | +5. Choose a provider type from the list: |
| 123 | + `Add Admin Server Connection Provider` |
| 124 | +6. Fill in any required connection details for the selected provider. In the URL filed enter `http://xxx.xx.x.x:7001` if in Production Mode `https://xxx.xx.x.x:9002`. |
| 125 | +7. Click OK to establish the connection. |
| 126 | + |
| 127 | +## Copyright |
| 128 | +Copyright (c) 2025, Oracle and/or its affiliates. |
0 commit comments