Installation package
- Docker image https://github.com/oracle/docker-images/tree/main/OracleWebLogic/dockerfiles/14.1.1.0
- Weblogic 14.1.1 https://www.oracle.com/middleware/technologies/weblogic-server-downloads.html
GitHub
See also
- https://danielveselka.blogspot.com/2017/10/build-weblogic-docker-image.html
- https://danielveselka.blogspot.com/2023/12/create-docker-oracle-java-11-image.html
Oracle Weblogic requires Oracle Java 11 image https://danielveselka.blogspot.com/2023/12/create-docker-oracle-java-11-image.html
dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ ls -lt
total 165964
-rw-r--r--. 1 dave dave 2718 Dec 10 13:25 Dockerfile
-rw-r--r--. 1 dave dave 169934047 Dec 10 13:22 jdk-11.0.20_linux-x64_bin.tar.gz
-rwxr-xr-x. 1 dave dave 411 Dec 10 13:16 build.sh
-rw-r--r--. 1 dave dave 2662 Dec 10 13:16 Dockerfile.8
dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
oracle/jdk 11-ol7 fea3c351284b 15 minutes ago 451MB
<none> <none> dcacebd8006e 16 minutes ago 1.14GB
oraclelinux 7-slim 506c06ed74d4 3 weeks ago 138MB
Build Weblogic 14.1.1 image
Docker image
Modify Java image tag according to what was built - Java tag is reffered from Oracle Weblogic image
11-ol7
Oracle HOWTO
Oracle WebLogic Server on Docker
=================================
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 Oracle WebLogic Server 14.1.1.0 images are based on Oracle Linux and Oracle JRE 8 (Server) or Oracle JDK 11.
The certification of Oracle WebLogic Server on Docker does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize, tweak, or create from scratch, new scripts and Dockerfiles.
For more information on the certification, please see the [Oracle WebLogic Server on Docker certification whitepaper](http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-server-docker-containers-2491959.pdf) and [The WebLogic Server Blog](https://blogs.oracle.com/weblogicserver/) for updates.
## How to build and run
This project offers sample Dockerfiles for Oracle WebLogic Server 14.1.1.0. It provides at least one Dockerfile for the `developer` distribution, a second Dockerfile for the `generic` distribution, and a third Dockerfile for the `slim` distribution.
1- The WebLogic `generic` image is supported for `development` and `production` deployment of WebLogic configurations using Docker. It contains the same binaries as those installed by the WebLogic generic installer. The WebLogic generic image is primarily intended for WebLogic domains managed with the WebLogic Kubernetes Operator, when WLS console-based monitoring, and possibly configuration, is required. All servers within a domain managed with the Operator will use the same WebLogic image. Support is also provided for environments where Kubernetes and/or the WebLogic Kubernetes Operator is not being used.
2- The WebLogic `slim` image is supported for `development` and `production` deployment of WebLogic configurations using Docker. In order to reduce image size, it contains a subset of the binaries included in the WebLogic generic image. The WebLogic console, WebLogic examples, WebLogic clients, Maven plug-ins and Java DB have been removed - all binaries that remain included are the same as those in the WebLogic generic image. The WebLogic slim image is primarily intended for WebLogic domains managed with the WebLogic Kubernetes Operator, when WLS console-based monitoring and configuration is not required, and a smaller image size than the generic image is preferred. If there are requirements to monitor the WebLogic configuration, they should be addressed using Prometheus and Grafana or other alternatives. All servers within a domain managed with the Operator will use the same WebLogic image. Support is also provided for environments where Kubernetes and/or the WebLogic Kubernetes Operator is not being used.
3- The WebLogic `developer` image is supported for `development` of WebLogic applications in Docker containers. In order to reduce image size, it contains a subset of the binaries included in the WebLogic generic image. WebLogic examples and WLS Console help files have been removed - all binaries that remain included are the same as those in the WebLogic generic image. The WebLogic developer image is primarily intended to provide a Docker image that is consistent with the WebLogic "quick installers" intended for `development` only. Production WebLogic domains should use the WebLogic generic or WebLogic slim images.
To assist in building the images, you can use the [`buildDockerImage.sh`](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage.
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.
### Building Oracle WebLogic Server Docker install images
**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.1.0 supports both Java SE 8 or 11. If you want to run WebLogic Server on Oracle Server JRE 8, you must build the image by using the Dockerfile in [`../../../OracleJava/java8`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-8). There is no longer a Oracle Server JRE for Java SE 11, it is bundled into Oracle JDK 11. If you want to run images of WebLogic based on the Oracle JDK 11 image, you must build the image by using the Dockerfile in [`../../../OracleJava/java11`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-11).
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.
$ sh buildDockerImage.sh
Usage: buildDockerImage.sh -v [version] [-d | -g | -m] [-s] [-j]
Builds a Docker Image for Oracle WebLogic Server.
Parameters:
-v: version to build. Required.
Choose : 14.1.1.0
-d: creates image based on 'developer' distribution
-g: creates image based on 'generic' distribution
-m: creates image based on 'slim' distribution
-j: choose '8' to create a 14.1.1.0 image with JDK 8 or '11' to create a 14.1.1.0 image with JDK 11.
-c: enables Docker image layer cache during build
-s: skips the MD5 check of packages
* select one distribution only: -d, -g, or -m
LICENSE UPL 1.0
Copyright (c) 2014, 2020, Oracle and/or its affiliates
**IMPORTANT:** The resulting images will have a single server domain (Administration Server only), by default.
1. To build the `14.1.1.0`image, from `dockerfiles`, call:
`$ sh buildDockerImage.sh -v 14.1.1.0 -d -j 11`
2. Verify that you now have this image in place with:
`$ docker images`
If the WebLogic image is built extending Oracle Server JRE 8, then the built image will be called oracle/weblogic:14.1.1.0-developer-8
If the WebLogic image is built extending Oracle JDK 11, then the built image will be called oracle/weblogic:14.1.1.0-developer-11
### Running a single server domain from the image
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.
#### Providing the Administration Server user name and password
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.
The format of the `domain.properties` file is key=value pair:
username=myadminusername
password=myadminpassword
**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.
#### Start the container
Start a container from the image created in step 1.
You can override the default values of the following parameters during runtime with the `-e` option:
* `ADMIN_NAME` (default: `AdminServer`)
* `ADMIN_LISTEN_PORT` (default: `7001`)
* `DOMAIN_NAME` (default: `base_domain`)
* `ADMINISTRATION_PORT_ENABLED` (default: `true`)
* `ADMINISTRATION_PORT` (default: `9002`)
**NOTE**: For security, the Administration port 9002 is enabled by default, before running the container in WebLogic 14.1.1.0. If you prefer to not enable the Administration port when you issue the `docker run` command, set `ADMINISTRTATION_PORT_ENABLED` to false. If you intend to run these images in production, then you must change the Production Mode to `production`. When you set the `DOMAIN_NAME`, the `DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME`.
$ docker run -d -p 7001:7001 -p 9002:9002 -v `HOST PATH where the domain.properties file is`:/u01/oracle/properties -e ADMINISTRATION_PORT_ENABLED=true -e DOMAIN_NAME=docker_domain -e ADMIN_NAME=docker-AdminServer oracle/weblogic:14.1.1.0-developer-11
Run the WLS Administration Console:
$ docker inspect --format '{{.NetworkSettings.IPAddress}}'<container-name>
In your browser, enter `https://xxx.xx.x.x:9002/console`. Your browser will request that you accept the Security Exception. To avoid the Security Exception, you must update the WebLogic Server SSL configuration with a custom identity certificate.
## Copyright
Copyright (c) 2014, 2022, Oracle and/or its affiliates.
Create Oracle Weblogic 14.1.1 image
dave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ ./buildDockerImage.sh -v 14.1.1.0 -g -j 11
Set- WebLogic's Version 14.1.1.0
Set- Distribution:Generic
Set- JDK Version 11
Version= 14.1.1.0 Distribution= generic-11
Checking if required packages are present and valid...
fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip: OK
=====================
Building image 'oracle/weblogic:14.1.1.0-generic-11' ...
Building image using Dockerfile.'generic-11'
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 637.8MB
Step 1/19 : FROM oracle/jdk:11-ol7 as builder
---> fea3c351284b
Step 2/19 : LABEL "provider"="Oracle""maintainer"="Monica Riccelli <monica.riccelli@oracle.com>""issues"="https://github.com/oracle/docker-images/issues""port.admin.listen"="7001""port.administration"="9002"
---> Running in 948085d825dd
Removing intermediate container 948085d825dd
---> 07adc77f7103
Step 3/19 : ENV ORACLE_HOME=/u01/oracle USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
---> Running in cf3d65b7e8b3
Removing intermediate container cf3d65b7e8b3
---> 11205d8e8724
Step 4/19 : RUN mkdir /u01 && useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && chown oracle:root -R /u01 && chmod -R 775 /u01
---> Running in ff64fe64d6a2
Removing intermediate container ff64fe64d6a2
---> 4bfdc0bd7458
Step 5/19 : ENV FMW_PKG=fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip FMW_JAR=fmw_14.1.1.0.0_wls_lite_generic.jar
---> Running in 1da04d801cc1
Removing intermediate container 1da04d801cc1
---> 49220deea1b1
Step 6/19 : COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/
---> 6d2a862fd32b
Step 7/19 : USER oracle
---> Running in abfbd86e7d09
Removing intermediate container abfbd86e7d09
---> 0e36338dbbf5
Step 8/19 : RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && ${JAVA_HOME}/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server"&& rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && rm -rf /u01/oracle/cfgtoollogs
---> Running in 3dae13c551ff
/
Launcher log file is /tmp/OraInstall2023-12-10_01-02-21PM/launcher2023-12-10_01-02-21PM.log.
Extracting the installer . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2603.809 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 8191 MB Passed
Checking temp space: must be greater than 300 MB. Actual 97604 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2023-12-10_01-02-21PM
Log: /tmp/OraInstall2023-12-10_01-02-21PM/install2023-12-10_01-02-21PM.log
Setting ORACLE_HOME...
Setting INSTALL_TYPE...
Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Validations are disabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100
The installation of Oracle Fusion Middleware 14.1.1 WebLogic Server and Coherence 14.1.1.0.0 completed successfully.
Logs successfully copied to /u01/oracle/.inventory/logs.
Removing intermediate container 3dae13c551ff
---> 74fc89d6f899
Final image build
Step 9/19 : FROM oracle/jdk:11-ol7
---> fea3c351284b
Step 10/19 : ENV ORACLE_HOME=/u01/oracle USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh HEALTH_SCRIPT_FILE=/u01/oracle/get_healthcheck_url.sh PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
---> Running in 6a4311a468aa
Removing intermediate container 6a4311a468aa
---> 05ed16dcb0ff
Step 11/19 : ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" ADMIN_NAME="${ADMIN_NAME:-AdminServer}" ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
---> Running in 05c67a838f44
Removing intermediate container 05c67a838f44
---> 2dc4c671343f
Step 12/19 : RUN mkdir -p /u01 && chmod 775 /u01 && useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && chown oracle:root /u01
---> Running in b06aae28f0ca
Removing intermediate container b06aae28f0ca
---> fd3567fea8fe
Step 13/19 : COPY --from=builder --chown=oracle:root /u01 /u01
---> c6a71035b723
Step 14/19 : COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/
---> de880dfbaebd
Step 15/19 : RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE
---> Running in 23f141d58ca1
Removing intermediate container 23f141d58ca1
---> 51861410f4e7
Step 16/19 : USER oracle
---> Running in 20c54fc88fef
Removing intermediate container 20c54fc88fef
---> 0c87661179ee
Step 17/19 : HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
---> Running in 6233c472670d
Removing intermediate container 6233c472670d
---> 19cf305ab999
Step 18/19 : WORKDIR ${ORACLE_HOME}
---> Running in f55ba3099d77
Removing intermediate container f55ba3099d77
---> 6cb61c41c12e
Step 19/19 : CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]
---> Running in c460c0d62829
Removing intermediate container c460c0d62829
---> a63e1c89480e
Successfully built a63e1c89480e
Successfully tagged oracle/weblogic:14.1.1.0-generic-11
WebLogic Docker Image for 'generic-11' version 14.1.1.0 is ready to be extended:
--> oracle/weblogic:14.1.1.0-generic-11
Build completed in 90 seconds.
List created images
dave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
oracle/weblogic 14.1.1.0-generic-11 a63e1c89480e 38 seconds ago 1.27GB
<none> <none> a6efff1e460a About a minute ago 1.91GB
<none> <none> 74fc89d6f899 4 minutes ago 1.91GB
oracle/jdk 11-ol7 fea3c351284b 38 minutes ago 451MB
<none> <none> dcacebd8006e 39 minutes ago 1.14GB
oraclelinux 7-slim 506c06ed74d4 3 weeks ago 138MB
List of files used
See repo ave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ find
.
./14.1.1.0
./14.1.1.0/Checksum.developer
./14.1.1.0/Checksum.generic
./14.1.1.0/Checksum.slim
./14.1.1.0/Dockerfile.developer-11
./14.1.1.0/Dockerfile.developer-8
./14.1.1.0/Dockerfile.generic-8
./14.1.1.0/Dockerfile.slim-11
./14.1.1.0/Dockerfile.slim-8
./14.1.1.0/README.md
./14.1.1.0/container-scripts
./14.1.1.0/container-scripts/create-wls-domain.py
./14.1.1.0/container-scripts/createAndStartEmptyDomain.sh
./14.1.1.0/container-scripts/get_healthcheck_url.sh
./14.1.1.0/fmw_14.1.1.0.0_wls_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_quick_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_slim_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_quick_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_quick_slim_Disk1_1of1.zip.download
./14.1.1.0/install.file
./14.1.1.0/oraInst.loc
./14.1.1.0/properties
./14.1.1.0/properties/domain.properties
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip
./14.1.1.0/Dockerfile.generic-11
./buildDockerImage.sh