Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OracleHTTPServer/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
Copyright (c) 2020, 2025, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
6 changes: 4 additions & 2 deletions OracleHTTPServer/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Oracle HTTP Server in containers
===================================
This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server based on Oracle Linux and Oracle JDK 8 (Server).
This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server 12.2.1.4.0 and JDK 8 and 14.1.2.0.0 JDK 17 and 21 based on Oracle Linux 8 and 9.
The certification of OHS in containers 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.

The samples in this repository are for trial use cases only. For alternative methods, we suggest obtaining base Oracle HTTP Server images from the [Oracle Container Registry](https://container-registry.oracle.com/), using the open source [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool) to create custom images.

## How to Build and Run
This project offers Dockerfile for Oracle HTTP Server in standalone mode. To assist in building the images, you can use the buildDockerImage.sh script. See below for instructions and usage

Expand Down Expand Up @@ -68,4 +70,4 @@ To download and run Oracle JDK regardless of inside or outside a container, you
All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the images are, unless otherwise noted, released under the Universal Permissive License v1.0.

## Copyright
Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
96 changes: 96 additions & 0 deletions OracleHTTPServer/dockerfiles/14.1.2.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#
# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.


#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
# ORACLE HTTP Server DOCKERFILES PROJECT
# -----------------------------------------
# This is the DockerFile for Oracle HTTP Server 14.1.2.0.0
#
# IMPORTANT
# -------------------------------------------
# The resulting image of this Dockerfile would have Oracle Linux 8 and 9 and Oracle HTTP Server 14.1.2.0.0 installed in standalone mode.

# A standalone domain will be configured in this image
#
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# (1) V1045136-01.zip Oracle HTTP Server 14.1.2.0 for Linux x86-64 installer
# Download from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html
# unzip you will need the OHS installer (bin file) fmw_14.1.2.0.0_ohs_linux64.bin
#
#
# HOW TO BUILD THIS IMAGE
# -----------------------
# Put all downloaded files in the same directory as this Dockerfile
# As root user run following command manually:
#
# $ sh buildDockerImage.sh -v 14.1.2.0.0
#
# Alternatively you can also run
#
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/$IMAGE_NAME:$VERSION-$INSTALL_TYPE .
#
# For example
#
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:14.1.2.0.0 .
#
# Pull JDK 17 image from OCR as base image
# -----------------------------------------
FROM container-registry.oracle.com/java/jdk:17.0.14

# Environment variables required for this build (do NOT change)
# ----------------------------------------------
ENV OHS_PKG=V1045136-01.zip
ENV OHS_BIN=fmw_14.1.2.0.0_ohs_linux64.bin
ENV ORACLE_HOME=/u01/oracle
ENV NM_PORT=5556
ENV OHS_LISTEN_PORT=7777
ENV OHS_SSL_PORT=4443
ENV JAVA_HOME=/usr/java/default
ENV DOMAIN_NAME=ohsDomain
ENV OHS_COMPONENT_NAME=ohs1
ENV PATH=${PATH}:${ORACLE_HOME}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin
ENV WLST_HOME=/u01/oracle/oracle_common/common/bin


# Copy packages to the new drive
# -------------------------------------------------------
COPY ${OHS_PKG} install.file oraInst.loc /u01/

# Install OL 8 or OL 9 required packages. Refer FMW 14.1.2.0.0 System requirements guide for complete list of packages
# Setup filesystem and oracle user
#---------------------------------------------------------------------------------------------------------
RUN yum install -y unzip libaio sysstat make psmisc gcc && \
yum clean all && \
chmod a+xr /u01 && \
useradd -b /u01 -m -s /bin/bash oracle && \
mkdir /u01/oracle/.inventory /u01/oracle/bootdir && \
chown oracle:oracle -R /u01

# Go to /u01 as user 'oracle' to proceed with OHS installation
#--------------------------------------------------------
USER oracle
WORKDIR /u01
#RUN unzip -q /u01/${OHS_PKG} && cd - && \
RUN unzip -q /u01/${OHS_PKG} && \
/u01/${OHS_BIN} -silent -novalidation -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=${ORACLE_HOME} && \
rm /u01/${OHS_BIN} /u01/oraInst.loc /u01/install.file && \
mkdir -p /u01/oracle/logs && \
chown oracle:oracle -R /u01/oracle/logs

# Copy required files to build this image
# ------------------------------------------------------
COPY container-scripts/* /u01/oracle/

#Expose all Ports
EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT}

# Final setup
USER oracle
WORKDIR ${ORACLE_HOME}

# Provision OHS instance
CMD ["/u01/oracle/provisionOHS.sh"]
12 changes: 12 additions & 0 deletions OracleHTTPServer/dockerfiles/14.1.2.0.0/V1045136-01.zip.download
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#
# Download the OHS 14.1.2.0.0 software for LINUX.x64 (V1045136-01.zip)
#
# from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html
#
#
6f5fbc72f151426a8cca775bed058b2d V1045136-01.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
# Author: [email protected]
#
# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#*************************************************************************
#This script will configure Oracle WebLogic Server Proxy Plug-In (mod_wl_ohs),
#in order to enable the Oracle HTTP Server instances to route applications
#deployed on the Admin Server, Single Managed Server or the Oracle WebLogic Server clusters
#
#Prerequisite:
#1.Create a directory which would be mounted to the container
#2.Create "custom_mod_wl_ohs.conf" as per your environment by referring to mod_wl_ohs.conf sample file and OHS document above
#3.Place the "custom_mod_wl_ohs.conf" inside the directory which will be mounted in the container
#4.During OHS container creation mount the directory which contains the "custom_mod_wl_ohs.conf"
#
# Note :
# If custom_mod_wl_ohs.conf is not provided, WebLogic Server Proxy Plug-In will not be configured. But OHS server will be still running.
# User may login to OHS container and manually configure the WebLogic Server Proxy Plug-In later
#
#MW_HOME - The root directory of your OHS standalone install
#DOMAIN_NAME - Env Value set by Dockerfile , default is "ohsDOmain"
#OHS_COMPONENT_NAME - Env Value set by Dockerfile , default is "ohs1"
#*************************************************************************
echo "ORACLE_HOME=${ORACLE_HOME:?"Please set MW_HOME"}"
echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}"
echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}"

DOMAIN_HOME=${ORACLE_HOME}/user_projects/domains/${DOMAIN_NAME}
INSTANCE_CONFIG_HOME=$DOMAIN_HOME/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}
export INSTANCE_CONFIG_HOME
echo "INSTANCE_CONFIG_DIR=${INSTANCE_CONFIG_HOME}"

#Search for the customized mod_wl_ohs.conf file
modwlsconfigfile=`find / -name 'custom_mod_wl_ohs.conf' 2>&1 | grep -v 'Permission denied'`
export modwlsconfigfile
echo "MODWLSCONFIGFILE IS ${modwlsconfigfile}"

# Check and copy custom_mod_wl_ohs.conf to OHS Instance Home
if [[ -n "${modwlsconfigfile/[ ]*\n/}" ]]; then
cd ${INSTANCE_CONFIG_HOME} || exit
mv mod_wl_ohs.conf mod_wl_ohs.conf.ORIGINAL
echo "Copying ${modwlsconfigfile} to ${INSTANCE_CONFIG_HOME} "
cp ${modwlsconfigfile} ${INSTANCE_CONFIG_HOME}/mod_wl_ohs.conf
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/python
#
# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
# Create OHS Domain and OHS System component
#
# OHS Domain 'ohsDomain' (or anything defined under DOMAIN_NAME) to be created inside the Docker image for OHS
# OHS System Component "ohs1" (Or anything defined under OHS_COMPONENT_NAME)to be created inside the Docker image for OHS
#
# Author: [email protected]
# ==============================================
import os, sys
#admin_port = (os.environ.get("ADMIN_PORT", "7001"))
ohs_http_port = (os.environ.get("OHS_LISTEN_PORT", "7777"))
ohs_ssl_port = (os.environ.get("OHS_SSL_PORT", "3333"))
ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1")
domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain")
domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain")

print('domain_name : [%s]' % domain_name);
print('domain_path : [%s]' % domain_path);
print('ohs_comp_name : [%s]' % ohs_comp_name);

# Select OHS standalone template
# ==============================================
setTopologyProfile('Compact')
selectTemplate('Oracle HTTP Server (Standalone)')
loadTemplates()
showTemplates()
# Create OHS System Component by the name ohs1, Configure OHS Listen Port and SSL Port
# ======================================================================
cd('/')
cd('SystemComponent/' + ohs_comp_name)
set('ComponentType','OHS')
cd('/')
cd('OHS/' + ohs_comp_name)
set('ListenAddress','')
set('ListenPort', ohs_http_port)
set('SSLListenPort', ohs_ssl_port)
# Set NodeManager user name and password
# ======================================================================
cd('/')
create('sc', 'SecurityConfiguration')
cd('SecurityConfiguration/sc')
set('NodeManagerUsername', username)
set('NodeManagerPasswordEncrypted', password)
#set('NodeManagerUsername','weblogic')
#set('NodeManagerPasswordEncrypted','welcome1')
setOption('NodeManagerType','PerDomainNodeManager')
setOption('OverwriteDomain', 'true')
#Write Domain, close template and exit
# ======================================================================
#writeDomain(r'/u01/oracle/user_projects/domains/ohsDomain')
writeDomain(domain_path)
dumpStack()
closeTemplate()
exit()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
Oracle HHTP Server Test
</TITLE>
</HEAD>
<BODY>
<H1>Oracle HTTP Server Test</H1>
<P>Welcome to Hello World!!! Test is successful</P>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#***************************************************************
# NOTE : This is a sample template to configure mod_weblogic.
# Author: [email protected]
#
#
#Refer to OHS documentation for more details and examples
#Section 2.4 @ https://docs.oracle.com/en/middleware/fusion-middleware/web-tier/14.1.2/develop-plugin/oracle.html#GUID-A463B189-DF47-4932-8B96-FD4F5FEC8D56
#*************************************************************************
LoadModule weblogic_module "/u01/oracle/ohs/modules/mod_wl_ohs.so"

<IfModule mod_weblogic.c>
WebLogicHost WEBLOGIC_HOST
WebLogicPort WEBLOGIC_PORT
</IfModule>

# Directive for weblogic admin Console deployed on Weblogic Admin Server
<Location /console>
SetHandler weblogic-handler
WebLogicHost WEBLOGIC_HOST
WeblogicPort WEBLOGIC_PORT
</Location>

# Directive for all application deployed on weblogic cluster with /weblogic prepath
#All application deployed on cluster can be accessed via http://myhost:7777/weblogic/application_end_url
<Location /weblogic>
WLSRequest On
WebLogicCluster WEBLOGIC_CLUSTER
PathTrim /weblogic
</Location>

#Directive for application deployed on single or set of Managed Servers (and NOT on weblogic cluster)
#<Location /application_end_url>
#SetHandler weblogic-handler
#WebLogicHost ManagedServer_HOST
#WeblogicPort ManagedServer_PORT
#</Location>
Loading