Skip to content

Commit bc16024

Browse files
authored
Adding dockerfiles for WebLogic Server 14.1.2 (#2954)
* Adding dockerfiles for WebLogic Server 14.1.2 * fix copyrights * address lint warnings * fixed lint problems * fix lint errors * Correct lint problems * Correct lint problems * Correct lint problems
1 parent c08bdfe commit bc16024

File tree

13 files changed

+598
-84
lines changed

13 files changed

+598
-84
lines changed

OracleWebLogic/README.md

Lines changed: 27 additions & 72 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Download Oracle WebLogic Server Generic Installer 14.1.1.0
2+
#
3+
# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
4+
#
5+
62ede5c1cc76750e4f18f4e4e7c354c6 V1045131-01.zip
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Copyright (c) 2025 Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
#
4+
# ORACLE DOCKERFILES PROJECT
5+
# --------------------------
6+
# This is the Dockerfile for Oracle WebLogic Server 14.1.2.0 Generic Distro
7+
#
8+
# REQUIRED FILES TO BUILD THIS IMAGE
9+
# ----------------------------------
10+
# V1045131-01.zip
11+
# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
12+
#
13+
# HOW TO BUILD THIS IMAGE
14+
# -----------------------
15+
# Put all downloaded files in the same directory as this Dockerfile
16+
# Run:
17+
# $ docker build -f Dockerfile.17 -t oracle/weblogic:14.1.2.0-17 .
18+
#
19+
# IMPORTANT
20+
# ---------
21+
# The resulting image of this Dockerfile contains a WLS Empty Domain.
22+
#
23+
# From the Oracle Docker GitHub Project
24+
# --------------------------------------
25+
FROM oracle/jdk:17 as builder
26+
27+
# Labels
28+
# ------
29+
LABEL "provider"="Oracle" \
30+
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
31+
"issues"="https://github.com/oracle/docker-images/issues" \
32+
"port.admin.listen"="7001" \
33+
"port.administration"="9002"
34+
35+
36+
# Common environment variables required for this build (do NOT change)
37+
# --------------------------------------------------------------------
38+
ENV ORACLE_HOME=/u01/oracle \
39+
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
40+
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
41+
42+
# Setup filesystem and oracle user
43+
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
44+
# ------------------------------------------------------------
45+
RUN mkdir /u01 && \
46+
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \
47+
chown oracle:root -R /u01 && \
48+
chmod -R 775 /u01
49+
50+
# Environment variables required for this build (do NOT change)
51+
# -------------------------------------------------------------
52+
ENV FMW_PKG=V1045131-01.zip \
53+
FMW_JAR=fmw_14.1.2.0.0_wls.jar
54+
55+
# Copy packages
56+
# -------------
57+
COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/
58+
59+
# Install
60+
# ------------------------------------------------------------
61+
USER oracle
62+
63+
RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && \
64+
${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" && \
65+
rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && \
66+
rm -rf /u01/oracle/cfgtoollogs
67+
68+
# Final image stage
69+
FROM oracle/jdk:17
70+
71+
ENV ORACLE_HOME=/u01/oracle \
72+
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
73+
SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \
74+
HEALTH_SCRIPT_FILE=/u01/oracle/get_healthcheck_url.sh \
75+
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
76+
77+
# Domain and Server environment variables
78+
# ------------------------------------------------------------
79+
ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
80+
ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \
81+
ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \
82+
ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \
83+
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
84+
85+
# Setup filesystem and oracle user
86+
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
87+
# ------------------------------------------------------------
88+
RUN mkdir -p /u01 && \
89+
chmod 775 /u01 && \
90+
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \
91+
chown oracle:root /u01
92+
93+
COPY --from=builder --chown=oracle:root /u01 /u01
94+
95+
# Copy scripts
96+
#-------------
97+
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/
98+
99+
RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \
100+
chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE
101+
102+
USER oracle
103+
104+
HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
105+
WORKDIR ${ORACLE_HOME}
106+
107+
# Define default command to start script.
108+
CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Copyright (c) 2025 Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
#
4+
# ORACLE DOCKERFILES PROJECT
5+
# --------------------------
6+
# This is the Dockerfile for Oracle WebLogic Server 14.1.2.0.0 Generic Distro
7+
#
8+
# REQUIRED FILES TO BUILD THIS IMAGE
9+
# ----------------------------------
10+
# V1045131-01.zip
11+
# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
12+
#
13+
# HOW TO BUILD THIS IMAGE
14+
# -----------------------
15+
# Put all downloaded files in the same directory as this Dockerfile
16+
# Run:
17+
# $ docker build -f Dockerfile.generic -t oracle/weblogic:14.1.2.0.0-generic .
18+
#
19+
# IMPORTANT
20+
# ---------
21+
# The resulting image of this Dockerfile contains a WLS Empty Domain.
22+
#
23+
# From the Oracle Docker GitHub Project
24+
# --------------------------------------
25+
FROM oracle/jdk:21 as builder
26+
27+
# Labels
28+
# ------
29+
LABEL "provider"="Oracle" \
30+
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
31+
"issues"="https://github.com/oracle/docker-images/issues" \
32+
"port.admin.listen"="7001" \
33+
"port.administration"="9002"
34+
35+
36+
# Common environment variables required for this build (do NOT change)
37+
# --------------------------------------------------------------------
38+
ENV ORACLE_HOME=/u01/oracle \
39+
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
40+
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
41+
42+
# Setup filesystem and oracle user
43+
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
44+
# ------------------------------------------------------------
45+
RUN mkdir /u01 && \
46+
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \
47+
chown oracle:root -R /u01 && \
48+
chmod -R 775 /u01
49+
50+
# Environment variables required for this build (do NOT change)
51+
# -------------------------------------------------------------
52+
ENV FMW_PKG=V1045131-01.zip \
53+
FMW_JAR=fmw_14.1.2.0.0_wls.jar
54+
55+
# Copy packages
56+
# -------------
57+
COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/
58+
59+
# Install
60+
# ------------------------------------------------------------
61+
USER oracle
62+
63+
RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && \
64+
${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" && \
65+
rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && \
66+
rm -rf /u01/oracle/cfgtoollogs
67+
68+
# Final image stage
69+
FROM oracle/jdk:21
70+
71+
ENV ORACLE_HOME=/u01/oracle \
72+
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
73+
SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \
74+
HEALTH_SCRIPT_FILE=/u01/oracle/get_healthcheck_url.sh \
75+
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
76+
77+
# Domain and Server environment variables
78+
# ------------------------------------------------------------
79+
ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
80+
ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \
81+
ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \
82+
ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \
83+
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
84+
85+
# Setup filesystem and oracle user
86+
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
87+
# ------------------------------------------------------------
88+
RUN mkdir -p /u01 && \
89+
chmod 775 /u01 && \
90+
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \
91+
chown oracle:root /u01
92+
93+
COPY --from=builder --chown=oracle:root /u01 /u01
94+
95+
# Copy scripts
96+
#-------------
97+
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/
98+
99+
RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \
100+
chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE
101+
102+
USER oracle
103+
104+
HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
105+
WORKDIR ${ORACLE_HOME}
106+
107+
# Define default command to start script.
108+
CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Download Oracle WebLogic Server Generic Installer 14.1.1.0
2+
#
3+
# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
4+
#
5+
62ede5c1cc76750e4f18f4e4e7c354c6 V1045131-01.zip

0 commit comments

Comments
 (0)