diff --git a/OracleHTTPServer/COPYRIGHT b/OracleHTTPServer/COPYRIGHT index a4d8bc1c4e..3b1931c0b4 100644 --- a/OracleHTTPServer/COPYRIGHT +++ b/OracleHTTPServer/COPYRIGHT @@ -1,4 +1,5 @@ -Copyright (c) 2001, 2019, Oracle Corporation. All rights reserved. +Copyright (c) 2020, 2024, 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 a copy of this software and associated documentation files (the diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 3bd711ce90..168058c5d5 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -1,7 +1,7 @@ -Oracle HTTP Server on Docker -=============== +# 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). -The certification of OHS on Docker does not require the use of any file presented in this repository. +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. ## How to Build and Run @@ -12,67 +12,60 @@ The **buildDockerImage.sh** script is just a utility shell script that performs ### Building Oracle JDK (Server JRE) base image You must first download the Oracle Server JRE binary and drop in folder `../OracleJava/java-8` and build that image. For more information, visit the [OracleJava](../OracleJava) folder's [README](../OracleJava/README.md) file. - $ cd ../OracleJava/java-8 - $ sh build.sh -You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com) or the [Docker Store](https://store.docker.com/images/oracle-serverjre-8). + "$ cd ../OracleJava/java-8" + "$ sh build.sh" -### Building OHS Docker Image +You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com). + +### Building OHS Container Image IMPORTANT: You have to download the OHS binary and put it in place (see .download files inside dockerfiles/). -Download the required package (see .download file) and drop them in the version folder (12.2.1.3.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. +Download the required package (see .download file) and drop them in the version folder (12.2.1.4.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. - $ sh buildDockerImage.sh -v 12.2.1.3.0 + "$ sh buildDockerImage.sh -v 12.2.1.4.0" -IMPORTANT: The resulting image will have a pre-configured domain. +IMPORTANT: The resulting image will have a pre-configured domain. ### Providing the Node Manager 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/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. +The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. The format of the domain.properties file is key=value pair: username=mynodemanagerusername password=mynodemanagerpassword ### How to run container - - - If you want to start the OHS container without specifying any configuration for mod_weblogic: -1. To start the OHS container with oracle/ohs:12.2.1.3.0 image, run the following command: - - - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.3.0 +1. To start the OHS container with oracle/ohs:12.2.1.4.0 image, run the following command: + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" If you want to start the OHS container with some pre-specified mod_weblogic configuration: -1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12213/webtier/develop-plugin/oracle.htm#PLGWL553) +1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12214/webtier/develop-plugin/oracle.htm#PLGWL553) 2. Place the custom_mod_wl_ohs.conf file in a directory in the host say,"/scratch/DockerVolume/OHSVolume" and then mount this directory into the container at the location "/config". - By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. - This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.3.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: + By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. + This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.4.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: - $ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.3.0 + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" ### Stopping the OHS instance To stop the OHS instance, execute the following command: - docker stop ohs (Assuming the name of conatiner is 'ohs') - + "$ docker stop " -To look at the Docker Container logs run: - - $ docker logs --details +To look at the Container logs run: + "$ docker logs --details " ## Support -Oracle HTTP Server on Docker is supported by Oracle. - +Oracle HTTP Server in containers is supported by Oracle. ## License -To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. +To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. -To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that page. -All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. +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 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download b/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download deleted file mode 100644 index 8b3aca9702..0000000000 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2016-2019 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 12.2.1.3.0 software for LINUX.x64 (fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip) -# -# from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html -# -# -649e77f7cd6e6621a27f4bfa61275cc9 fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile similarity index 55% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 5c05ece2ec..62018c714a 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. # @@ -7,17 +7,17 @@ # # ORACLE HTTP Server DOCKERFILES PROJECT # ----------------------------------------- -# This is the DockerFile for Oracle HTTP Server 12.2.1.3.0 +# This is the DockerFile for Oracle HTTP Server 12.2.1.4.0 # # IMPORTANT # ------------------------------------------- -# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.3.0 installed in standalone mode. +# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.4.0 installed in standalone mode. # A standalone domain will be configured in this image # # REQUIRED FILES TO BUILD THIS IMAGE # ---------------------------------- -# (1) fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip +# (1) fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip # Download from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html # # HOW TO BUILD THIS IMAGE @@ -25,7 +25,7 @@ # Put all downloaded files in the same directory as this Dockerfile # As root user run following command manually: # -# $ sh buildDockerImage.sh -v 12.2.1.3.0 +# $ sh buildDockerImage.sh -v 12.2.1.4.0 # # Alternatively you can also run # @@ -33,38 +33,32 @@ # # For example # -# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.3.0 . +# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.4.0 . # # Pull serverjre:8 base image # ----------------------------------- FROM oracle/serverjre:8 -# Maintainer -# ------------------------------------ -MAINTAINER Prabhat Kishore - # Environment variables required for this build (do NOT change) # ---------------------------------------------- -ENV OHS_PKG=fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip \ - OHS_BIN=fmw_12.2.1.3.0_ohs_linux64.bin \ - ORACLE_HOME=/u01/oracle/ohssa \ - PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin \ - NM_PORT=5556 \ - OHS_LISTEN_PORT=7777 \ - OHS_SSL_PORT=4443 \ - JAVA_HOME=/usr/java/default \ - MW_HOME=/u01/oracle/ohssa \ - DOMAIN_NAME=ohsDomain \ - OHS_COMPONENT_NAME=ohs1 \ - PATH=$PATH:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts \ - WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin +ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip +ENV OHS_BIN=fmw_12.2.1.4.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/ +COPY ${OHS_PKG} install.file oraInst.loc /u01/ -# Install OL7 required packages. Refer FMW 12.2.1.3 System requirements guide for complete list of packages +# Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages # Setup filesystem and oracle user #--------------------------------------------------------------------------------------------------------- RUN yum install -y unzip libaio sysstat make psmisc gcc && \ @@ -77,20 +71,24 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ # Go to /u01 as user 'oracle' to proceed with OHS installation #-------------------------------------------------------- USER oracle -RUN cd /u01 && unzip -q /u01/$OHS_PKG && cd - && \ - /u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \ - rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \ - mkdir /u01/oracle/container-scripts/ /u01/oracle/logs +WORKDIR /u01 +#RUN unzip -q /u01/${OHS_PKG} && cd - && \ +RUN unzip -q /u01/${OHS_PKG} && \ + /u01/${OHS_BIN} -silent -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/container-scripts/ +COPY container-scripts/* /u01/oracle/ #Expose all Ports -EXPOSE $OHS_SSL_PORT $OHS_LISTEN_PORT $NM_PORT +EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT} # Final setup -WORKDIR /u01/oracle/container-scripts +USER oracle +WORKDIR ${ORACLE_HOME} # Provision OHS instance -CMD ["/u01/oracle/container-scripts/provisionOHS.sh"] +CMD ["/u01/oracle/provisionOHS.sh"] diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh similarity index 91% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh index e28bc85242..f981b3e52e 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh @@ -1,7 +1,7 @@ #!/bin/bash # Author: hemastuti.baruah@oracle.com # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -25,11 +25,11 @@ #DOMAIN_NAME - Env Value set by Dockerfile , default is "ohsDOmain" #OHS_COMPONENT_NAME - Env Value set by Dockerfile , default is "ohs1" #************************************************************************* -echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}" +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=${MW_HOME}/user_projects/domains/${DOMAIN_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}" @@ -41,7 +41,7 @@ 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} +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 diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py old mode 100644 new mode 100755 similarity index 84% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py index 346437c7c5..06626598ff --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -17,7 +17,12 @@ 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 = '/u01/oracle/ohssa/user_projects/domains/' + domain_name +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') @@ -47,7 +52,7 @@ setOption('OverwriteDomain', 'true') #Write Domain, close template and exit # ====================================================================== -#writeDomain(r'/u01/oracle/ohssa/user_projects/domains/ohsDomain') +#writeDomain(r'/u01/oracle/user_projects/domains/ohsDomain') writeDomain(domain_path) dumpStack() closeTemplate() diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/helloWorld.html b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/helloWorld.html similarity index 100% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/helloWorld.html rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/helloWorld.html diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample similarity index 80% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample index 28b04e0334..68ba970ea6 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -8,9 +8,9 @@ # # #Refer to OHS documentation for more details and examples -#Section 2.4 @ http://docs.oracle.com/middleware/12213/webtier/develop-plugin/oracle.htm#PLGWL553 +#Section 2.4 @ https://docs.oracle.com/en/middleware/fusion-middleware/web-tier/12.2.1.4/develop-plugin/oracle.html#GUID-A463B189-DF47-4932-8B96-FD4F5FEC8D56 #************************************************************************* -LoadModule weblogic_module "/u01/oracle/ohssa/ohs/modules/mod_wl_ohs.so" +LoadModule weblogic_module "/u01/oracle/ohs/modules/mod_wl_ohs.so" WebLogicHost WEBLOGIC_HOST diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh similarity index 50% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index a9779808f4..72872ac2af 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -1,6 +1,5 @@ #!/bin/bash -# Author: prabhat.kishore@oracle.com -# Copyright (c) 2017-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -17,7 +16,7 @@ function _term() { echo "Stopping container." echo "SIGTERM received, shutting down the server!" - ${WLST_HOME}/wlst.sh /u01/oracle/container-scripts/stop-ohs.py + ${WLST_HOME}/wlst.sh /u01/oracle/stop-ohs.py ${DOMAIN_HOME}/bin/stopNodeManager.sh } @@ -31,18 +30,17 @@ function _kill() { trap _term SIGTERM # Set SIGKILL handler -trap _kill SIGKILL +#trap _kill SIGKILL -echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}" echo "ORACLE_HOME=${ORACLE_HOME:?"Please set ORACLE_HOME"}" echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}" echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}" -export MW_HOME ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME +export ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME -#Set WL_HOME, WLST_HOME, DOMAIN_HOME and NODEMGR_HOME -WL_HOME=${ORACLE_HOME}/wlserver +#Set WL_HOME, WLST_HOME, DOMAIN_HOME, NODEMGR_HOME, and LOGS_DIR +#WL_HOME=${ORACLE_HOME}/wlserver WLST_HOME=${ORACLE_HOME}/oracle_common/common/bin echo "WLST_HOME=${WLST_HOME}" @@ -53,11 +51,15 @@ echo "DOMAIN_HOME=${DOMAIN_HOME}" NODEMGR_HOME=${DOMAIN_HOME}/nodemanager export NODEMGR_HOME -echo "PATH=${PATH}" -PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin + +PATH=$PATH:${ORACLE_HOME}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin export PATH echo "PATH=${PATH}" +LOG_DIR=${ORACLE_HOME}/logs +export LOG_DIR +echo "LOG_DIR=${LOG_DIR}" + # Set JAVA_OPTIONS and JAVA_HOME for node manager JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.RootDirectory=${DOMAIN_HOME}" export JAVA_OPTIONS @@ -65,13 +67,10 @@ export JAVA_OPTIONS JAVA_HOME=${ORACLE_HOME}/oracle_common/jdk/jre export JAVA_HOME +mkdir -p $ORACLE_HOME/bootdir PROPERTIES_FILE=/u01/oracle/bootdir/domain.properties export PROPERTIES_FILE -#Declare and initializing NMSTATUS -declare -a NMSTATUS -NMSTATUS[0]="NOT RUNNING" - if [ ! -e "$PROPERTIES_FILE" ]; then echo "A properties file with the username and password needs to be supplied." exit @@ -96,23 +95,76 @@ if [ -z "$NM_PASSWORD" ]; then exit fi -wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/container-scripts/create-sa-ohs-domain.py +wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-sa-ohs-domain.py # Set the NM username and password in the properties file -echo "username=$NM_USER" >> /u01/oracle/ohssa/user_projects/domains/ohsDomain/config/nodemanager/nm_password.properties -echo "password=$NM_PASSWORD" >> /u01/oracle/ohssa/user_projects/domains/ohsDomain/config/nodemanager/nm_password.properties -mv /u01/oracle/container-scripts/helloWorld.html ${ORACLE_HOME}/user_projects/domains/ohsDomain/config/fmwconfig/components/OHS/ohs1/htdocs/helloWorld.html +echo "username=$NM_USER" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties +echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties +mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/htdocs/helloWorld.html + +echo "Copying Configuration to OHS Instance" +conf=$(ls -l /u01/oracle/config/moduleconf/*.conf 2>/dev/null | wc -l) +if [ $conf -gt 0 ] +then + echo " Copying moduleconf conf files to OHS Instance" + cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf +fi + +conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) +if [ $conf -gt 0 ] +then + echo " Copying root conf files OHS Instance" + cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME +fi + +conf=$(ls -l /u01/oracle/config/wallet/* 2>/dev/null | wc -l) +if [ $conf -gt 0 ] +then + echo " Copying OHS Wallets to OHS Instance" + mkdir -p ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/keystores > /dev/null 2>&1 + cp -L /u01/oracle/config/wallet/* ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/keystores/ +fi + +htdocs=$(ls -l /u01/oracle/config/htdocs/*.html 2>/dev/null | wc -l) +if [ $htdocs -gt 0 ] +then + echo "Copying htdocs to OHS Instance" + cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs +fi + +if [ "$DEPLOY_WG" = "true" ] +then + echo "Deploying Webgate" + if ! [ -e /u01/oracle/config/webgate/config/ObAccessClient.xml ] + then + echo "Must provide WebGate Configutaion files when DEPLOY_WG is true." + exit 1 + fi + cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ || exit + ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} -oh $ORACLE_HOME + cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools || exit + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib + ./EditHttpConf -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} -oh $ORACLE_HOME + echo "Adding OAP API exclusion to webgate.conf" + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -print0 -name '.*' | xargs rm -rf +else + echo "WebGate not deployed" +fi fi # Start node manager -${DOMAIN_HOME}/bin/startNodeManager.sh > /u01/oracle/logs/nodemanager$$.log 2>&1 & +mkdir ${LOG_DIR} +${DOMAIN_HOME}/bin/startNodeManager.sh > ${LOG_DIR}/nodemanager$$.log 2>&1 & statusfile=/tmp/notifyfifo.$$ #Check if Node Manager is up and running by inspecting logs mkfifo "${statusfile}" || exit 1 { # run tail in the background so that the shell can kill tail when notified that grep has exited - tail -f /u01/oracle/logs/nodemanager$$.log & + tail -f ${LOG_DIR}/nodemanager$$.log & # remember tail's PID tailpid=$! # wait for notification that grep has exited @@ -123,7 +175,7 @@ mkfifo "${statusfile}" || exit 1 } | { grep -m 1 "Secure socket listener started on port 5556" # notify the first pipeline stage that grep is done - echo "RUNNING"> /u01/oracle/logs/Nodemanage$$.status + echo "RUNNING"> ${LOG_DIR}/Nodemanage$$.status echo "Node manager is running" echo >${statusfile} } @@ -132,14 +184,14 @@ rm "${statusfile}" #Check if configureWLSProxyPlugin.sh needs to be invoked if [ -f /config/custom_mod_wl_ohs.conf ]; then -configureWLSProxyPlugin.sh + configureWLSProxyPlugin.sh fi #Start OHS component only if Node Manager is up -if [ -f /u01/oracle/logs/Nodemanage$$.status ]; then +if [ -f ${LOG_DIR}/Nodemanage$$.status ]; then echo "Node manager running, hence starting OHS server" -${WLST_HOME}/wlst.sh -loadProperties $PROPERTIES_FILE /u01/oracle/container-scripts/start-ohs.py -echo "OHS server has been started " +${WLST_HOME}/wlst.sh -loadProperties $PROPERTIES_FILE /u01/oracle/start-ohs.py +echo "OHS server has been started" fi #Tail all server logs diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py old mode 100644 new mode 100755 similarity index 84% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py index e64d899c81..c326989de4 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py @@ -1,18 +1,17 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # # Author: hemastuti.baruah@oracle.com # Starts the ohs1 component server inside the ohsDomain - # import os, sys java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name -oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") +domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") +oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: JAVA_HOME = java_home diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py old mode 100644 new mode 100755 similarity index 83% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py index 56a92e599a..80baeae37e --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -9,8 +9,8 @@ java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name -oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") +domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") +oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: JAVA_HOME = java_home diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download b/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download new file mode 100644 index 0000000000..f17c6b4a2d --- /dev/null +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download @@ -0,0 +1,12 @@ +# +# Copyright (c) 2024 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 12.2.1.4.0 software for LINUX.x64 (fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip) +# +# from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html +# +# +bbf38383b47fe7a080bd931b86870363 fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file b/OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file similarity index 91% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file index 0e7f97c785..2e2ec49b38 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc b/OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc similarity index 68% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc index 7adad5f08a..4ff3e4476d 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties b/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties new file mode 100644 index 0000000000..d4183f2009 --- /dev/null +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties @@ -0,0 +1,2 @@ +username=username +password=passwd diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index 508d11d1c8..090d3042a8 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -7,7 +7,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024 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. @@ -19,12 +19,12 @@ Usage: buildDockerImage.sh -v [version] [-s] Builds a Docker Image for Oracle HTTP Server (standalone) . Parameters: - -v: Release version to build. Required. E.g 12.2.1.3.0 + -v: Release version to build. Required. E.g 12.2.1.4.0 -s: skips the MD5 check of packages LICENSE Universal Permissive License v1.0 -Copyright (c) 2016-2019: Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved. EOF @@ -35,17 +35,19 @@ exit 0 # Validate packages checksumPackages() { echo "Checking if required packages are present and valid..." - md5sum -c *.download - if [ "$?" -ne 0 ]; then + # md5sum -c *.download + # if [ "$?" -ne 0 ]; then + MDSUM="md5sum -c *.download" + if [ "$MDSUM" -ne 0 ]; then echo "MD5 for required packages to build this image did not match!" echo "Make sure to download missing files in folder dockerfiles. See *.download files for more information" - exit $? + exit $MDSUM fi } #Parameters -VERSION="12.2.1.3.0" +VERSION="12.2.1.4.0" SKIPMD5=0 while getopts "hsdgiv:" optname; do case "$optname" in @@ -68,7 +70,8 @@ done # OHS Image Name IMAGE_NAME="oracle/ohs:$VERSION" -cd $VERSION +# cd $VERSION +cd $VERSION || exit if [ ! "$SKIPMD5" -eq 1 ]; then checksumPackages @@ -78,19 +81,24 @@ fi # Proxy settings PROXY_SETTINGS="" -if [ "${http_proxy}" != "" ]; then +#Default Proxy settings to no_proxy +http_proxy="" +https_proxy="" +ftp_proxy="" +no_proxy="" +if [ "$http_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}" fi -if [ "${https_proxy}" != "" ]; then +if [ "$https_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}" fi -if [ "${ftp_proxy}" != "" ]; then +if [ "$ftp_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}" fi -if [ "${no_proxy}" != "" ]; then +if [ "$no_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}" fi @@ -106,23 +114,13 @@ echo "Proxy Settings '$PROXY_SETTINGS'" # BUILD THE IMAGE (replace all environment variables) BUILD_START=$(date '+%s') docker build --force-rm=true --no-cache=true $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile . || { - echo "There was an error building the image." + echo "OHS Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation." exit 1 } BUILD_END=$(date '+%s') BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START` echo "" - -if [ $? -eq 0 ]; then -cat << EOF - OHS Standalone Docker Image for version: $VERSION is ready to be used. - - --> $IMAGE_NAME - - Build completed in $BUILD_ELAPSED seconds. - -EOF -else - echo "OHS Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation." -fi +echo "OHS Standalone Docker Image for version: $VERSION is ready to be used." +echo " --> $IMAGE_NAME" +echo "Build completed in $BUILD_ELAPSED seconds." diff --git a/OracleHTTPServer/samples/12213-patch/README.md b/OracleHTTPServer/samples/12213-patch/README.md deleted file mode 100644 index f025e710c5..0000000000 --- a/OracleHTTPServer/samples/12213-patch/README.md +++ /dev/null @@ -1,55 +0,0 @@ -Applying patch on Oracle HTTP Server -=============== -This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. -The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. - -## How to Build and Run - -First make sure you have built oracle/ohs:12.2.1.3.0. - -Then download the patch and place it next to this README. - -To build, run: - - $ docker build -t oracle/ohs:12213-patch . - - -### Providing the Node Manager 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/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. - -The format of the domain.properties file is key=value pair: -username=mynodemanagerusername -password=mynodemanagerpassword - -### How to run container - - -To start the OHS container with the patched image, run the following command: - - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12213-patch - - -### Stopping the OHS instance -To stop the OHS instance, execute the following command: - - docker stop ohs (Assuming the name of conatiner is 'ohs') - - -To look at the Docker Container logs run: - - $ docker logs --details - - -## Support -Oracle HTTP Server on Docker is supported by Oracle. - - -## License -To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. - -To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. - -All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. - -## Copyright -Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/samples/12213-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile similarity index 66% rename from OracleHTTPServer/samples/12213-patch/Dockerfile rename to OracleHTTPServer/samples/12214-patch/Dockerfile index 47131d7fdb..84bd3748fe 100644 --- a/OracleHTTPServer/samples/12213-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -1,6 +1,6 @@ # LICENSE UPL 1.0 # -# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. # # ORACLE DOCKERFILES PROJECT # -------------------------- @@ -8,27 +8,23 @@ # REQUIRED FILES TO BUILD THIS IMAGE # ---------------------------------- -# (1) p12345678_122130_Generic.zip +# (1) p36393221_122140_Linux-x86-64.zip # Download the patch from http://support.oracle.com # # HOW TO BUILD THIS IMAGE # ----------------------- # Put all downloaded files in the same directory as this Dockerfile # Run: -# $ sudo docker build -t oracle/ohs:12213-patch . +# $ sudo docker build -t oracle/ohs:12214-patch . # # Pull base image # --------------- -FROM oracle/ohs:12.2.1.3.0 - -# Maintainer -# ---------- -MAINTAINER Prabhat Kishore +FROM oracle/ohs:12.2.1.4.0 # Environment variables required for this build (do NOT change) # ------------------------------------------------------------- -ENV PATCH_PKG="p12345678_122130_Linux-x86-64.zip" +ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" # Copy supplemental package and scripts # -------------------------------- @@ -37,8 +33,9 @@ COPY $PATCH_PKG /u01/ # Installation of Supplemental Quick Installer # -------------------------------------------- USER oracle -RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ - cd /u01/12345678 && $ORACLE_HOME/OPatch/opatch apply -silent && \ +WORKDIR /u01 +RUN $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && \ + $ORACLE_HOME/OPatch/opatch apply -silent /u01/36393221 && \ rm /u01/$PATCH_PKG WORKDIR ${ORACLE_HOME} diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md new file mode 100644 index 0000000000..15a843d4f6 --- /dev/null +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -0,0 +1,47 @@ +# Applying patch on Oracle HTTP Server +=============== +This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. +The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. + +## How to Build and Run +First make sure you have built oracle/ohs:12.2.1.4.0. + +Then download the patch and place it next to this README. + +To build, run: + + "$ docker build -t oracle/ohs:12214-patch ." + +### Providing the Node Manager password +The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at container runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. + +The format of the domain.properties file is key=value pair: +username=mynodemanagerusername +password=mynodemanagerpassword + +### How to run container +To start the OHS container with the patched image, run the following command: + + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12214-patch" + +### Stopping the OHS instance +To stop the OHS instance, execute the following command: + + "$ docker stop " + +To look at the Container logs run: + + "$ docker logs --details " + +## Support +Oracle HTTP Server is supported in containers by Oracle. + +## License +To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. + +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that page. + +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) 2024 Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download b/OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download similarity index 76% rename from OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download rename to OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download index df65e71405..684078738c 100644 --- a/OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download +++ b/OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download @@ -2,7 +2,7 @@ # # https://support.oracle.com # -# 1) Download the ZIP file "Patch" for Oracle HTTP Server 12.2.1.3 +# 1) Download the ZIP file "Patch" for Oracle HTTP Server 12.2.1.4 # 2) Put the ZIP file in the same location as this .download file # -113aa9a64918cacf9c4fa03d85a5aa85 p28061540_122130_Linux-x86-64.zip +c66c76aa256882ce0e60aaae7ffc5abb p36393221_122140_Linux-x86-64.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer b/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer deleted file mode 100644 index 8b78a35955..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer +++ /dev/null @@ -1,6 +0,0 @@ -# Download WebLogic Server Quick Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -a5d4811b431b2166e3e16c20c36ede09 fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip - diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic b/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic deleted file mode 100644 index 7290c15d43..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic +++ /dev/null @@ -1,6 +0,0 @@ -# Download WebLogic Server Generic Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -ea1b961b8896ac2f4006921965e41ddf fmw_12.2.1.3.0_wls_Disk1_1of1.zip - diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer deleted file mode 100644 index 7979feb136..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer +++ /dev/null @@ -1,114 +0,0 @@ -#Copyright (c) 2014, 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This is the Dockerfile for WebLogic 12.2.1.3 Quick Install Distro -# -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip -# Download the Developer Quick installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -# (2) server-jre-8uXX-linux-x64.tar.gz -# Download from http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html -# -# HOW TO BUILD THIS IMAGE -# ----------------------- -# Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ docker build -f Dockerfile.developer -t oracle/weblogic:12.2.1.3-developer . -# -# IMPORTANT -# --------- -# The resulting image of this Dockerfile contains a WLS Empty Domain. -# -# Extend base JRE image -# You must build the image by using the Dockerfile in GitHub project `../../../OracleJava/java8` -# ---------------------------------------------------------------------------------------------- -FROM oracle/serverjre:8 as builder - -# Labels -# ------ -LABEL "provider"="Oracle" \ - "maintainer"="Monica Riccelli " \ - "issues"="https://github.com/oracle/docker-images/issues" \ - "port.admin.listen"="7001" \ - "port.administration"="9002" - - -# Common environment variables required for this build (do NOT change) -# -------------------------------------------------------------------- -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 - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root -R /u01 && \ - chmod -R 775 /u01 - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV FMW_PKG=fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip \ - FMW_JAR=fmw_12.2.1.3.0_wls_quick.jar - -# Copy packages -# ------------- -COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/ - -# Install -# ------------------------------------------------------------ -USER oracle -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 && \ - rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && \ - rm -rf /u01/oracle/cfgtoollogs - -# Final image stage -FROM oracle/serverjre:8 - -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 - -# Domain and Server environment variables -# ------------------------------------------------------------ -ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ - ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \ - ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \ - DEBUG_FLAG=true \ - PRODUCTION_MODE=dev \ - ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ - ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir -p /u01 && \ - chmod 775 /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root /u01 - -COPY --from=builder --chown=oracle:root /u01 /u01 - -# Copy scripts -#------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ - -RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ - chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE - -USER oracle - -HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 -WORKDIR ${ORACLE_HOME} - -# Define default command to start script. -CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic deleted file mode 100644 index 2f8f556c01..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic +++ /dev/null @@ -1,111 +0,0 @@ -#Copyright (c) 2014, 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This is the Dockerfile for Oracle WebLogic Server 12.2.1.3 Generic Distro -# -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) fmw_12.2.1.3.0_wls_Disk1_1of1.zip -# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -# (2) server-jre-8uXX-linux-x64.tar.gz -# Download from http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html -# -# HOW TO BUILD THIS IMAGE -# ----------------------- -# Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ docker build -f Dockerfile.generic -t oracle/weblogic:12.2.1.3-generic . -# -# IMPORTANT -# --------- -# The resulting image of this Dockerfile contains a WLS Empty Domain. -# -# Extend base JRE image -# ---------------------------------------------------------------------------------------------- -FROM oracle/serverjre:8 as builder - -# Labels -# ------ -LABEL "provider"="Oracle" \ - "maintainer"="Monica Riccelli " \ - "issues"="https://github.com/oracle/docker-images/issues" \ - "port.admin.listen"="7001" \ - "port.administration"="9002" - -# Common environment variables required for this build (do NOT change) -# -------------------------------------------------------------------- -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 - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root -R /u01 && \ - chmod -R 775 /u01 - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV FMW_PKG=fmw_12.2.1.3.0_wls_Disk1_1of1.zip \ - FMW_JAR=fmw_12.2.1.3.0_wls.jar - -# Copy packages -# ------------- -COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/ - -# Install -# ------------------------------------------------------------ -USER oracle - -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 - -# Final image stage -FROM oracle/serverjre:8 - -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 - -# Domain and Server environment variables -# ------------------------------------------------------------ -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}" - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir -p /u01 && \ - chmod 775 /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root /u01 - -COPY --from=builder --chown=oracle:root /u01 /u01 - -# Copy scripts -#------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ - -RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ - chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE - -USER oracle - -HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 -WORKDIR ${ORACLE_HOME} - -# Define default command to start script. -CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/README.md b/OracleWebLogic/dockerfiles/12.2.1.3/README.md deleted file mode 100644 index a3634b0bc1..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/README.md +++ /dev/null @@ -1,100 +0,0 @@ -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 12.2.1.3 images are based on Oracle Linux and Oracle JRE 8 (Server). - -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 12cR2 (12.2.1.3). It provides at least one Dockerfile for the 'developer' distribution, a second Dockerfile for the 'generic' distribution. 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/`). The WebLogic image extends the Oracle JRE Server 8 image. You must build the image by using the Dockerfile in [`../../../OracleJava/java8`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-8). - -**NOTE:** The Dockerfiles install WebLogic with `INSTALL_TYPE=WebLogic Server` which does not include the WebLogic samples in the installation. If you want to include the WebLogic samples you need to change `INSTALL_TYPE=Complete with Examples` in the install.file. - -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 ] [-s] - Builds a Docker Image for Oracle WebLogic Server. - - Parameters: - -v: version to build. Required. - Choose : 12.2.1.3 - -d: creates image based on 'developer' distribution - -g: creates image based on 'generic' distribution - -c: enables Docker image layer cache during build - -s: skips the MD5 check of packages - - * select one distribution only: -d, or -g - - LICENSE UPL 1.0 - - Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. - -**IMPORTANT:** The resulting images will have a single server domain (Administration Server only), by default. - - - 1. To build the `12.2.1.3`image, from `dockerfiles`, call: - - `$ sh buildDockerImage.sh -v 12.2.1.3 -d` - - 2. Verify that you now have this image in place with: - - `$ docker images` - -### 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 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 12.2.1.3 the patch 27117282 must be applied. Please download the patch and apply it after you have built the 12.2.1.3 image. You can follow the sample https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-patch to see how to patch. An alternative is to not enable 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:12.2.1.3-developer - -Run the WLS Administration Console: - - $ docker inspect --format '{{.NetworkSettings.IPAddress}}' - -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. - -## Choose your Oracle WebLogic Server distribution - -This project hosts two configurations (depending on the Oracle WebLogic Server version) for building Docker images with WebLogic Server 12c. - - * Quick Install Developer Distribution - - - For more information on the Oracle WebLogic Server 12cR2 Quick Install Developer Distribution, see [WLS Quick Install Distribution for Oracle WebLogic Server 12.2.1.3.0](http://download.oracle.com/otn/nt/middleware/12c/wls/12213/README.txt). - - - * Generic Distribution - - - For more information on the Oracle WebLogic Server 12cR2 Generic Full Distribution, see [WebLogic Server 12.2.1.3 Documentation](http://docs.oracle.com/middleware/12213/wls/index.html). - -## Samples for Oracle WebLogic Server domain creation -To give users an idea of how to create a WebLogic domain and cluster from a custom Dockerfile which extends the WebLogic Server install image, we provide a few samples for 12c versions of the developer distribution. For an example, look at the `12213-domain` sample. - -## Copyright -Copyright (c) 2014, 2022, Oracle and/or its affiliates. diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py deleted file mode 100644 index 3ebe5004ac..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py +++ /dev/null @@ -1,91 +0,0 @@ -#Copyright (c) 2014, 2022, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# WebLogic on Docker Default Domain -# -# Domain, as defined in DOMAIN_NAME, will be created in this script. Name defaults to 'base_domain'. -# -# Since : October, 2014 -# Author: monica.riccelli@oracle.com -# ============================================== -domain_name = os.environ.get("DOMAIN_NAME", "base_domain") -admin_name = os.environ.get("ADMIN_NAME", "AdminServer") -admin_listen_port = int(os.environ.get("ADMIN_LISTEN_PORT", "7001")) -domain_path = '/u01/oracle/user_projects/domains/%s' % domain_name -production_mode = os.environ.get("PRODUCTION_MODE", "prod") -administration_port_enabled = os.environ.get("ADMINISTRATION_PORT_ENABLED", "true") -administration_port = int(os.environ.get("ADMINISTRATION_PORT", "9002")) - -print('domain_name : [%s]' % domain_name); -print('admin_listen_port : [%s]' % admin_listen_port); -print('domain_path : [%s]' % domain_path); -print('production_mode : [%s]' % production_mode); -print('admin name : [%s]' % admin_name); -print('administration_port_enabled : [%s]' % administration_port_enabled); -print('administration_port : [%s]' % administration_port); - -# Open default domain template -# ============================ -readTemplate("/u01/oracle/wlserver/common/templates/wls/wls.jar") - -set('Name', domain_name) -setOption('DomainName', domain_name) - -# Set Administration Port -# ======================= -if administration_port_enabled != "false": - set('AdministrationPort', administration_port) - set('AdministrationPortEnabled', 'true') - -# Disable Admin Console -# -------------------- -# cmo.setConsoleEnabled(false) - -# Configure the Administration Server and SSL port. -# ================================================= -cd('/Servers/AdminServer') -set('Name', admin_name) -set('ListenAddress', '') -set('ListenPort', admin_listen_port) -if administration_port_enabled != "false": - create(admin_name, 'SSL') - cd('SSL/' + admin_name) - set('Enabled', 'True') - -# Define the user password for weblogic -# ===================================== -cd(('/Security/%s/User/weblogic') % domain_name) -cmo.setName(username) -cmo.setPassword(password) - -# Write the domain and close the domain template -# ============================================== -setOption('OverwriteDomain', 'true') -setOption('ServerStartMode',production_mode) - -# Create Node Manager -# =================== -#cd('/NMProperties') -#set('ListenAddress','') -#set('ListenPort',5556) -#set('CrashRecoveryEnabled', 'true') -#set('NativeVersionEnabled', 'true') -#set('StartScriptEnabled', 'false') -#set('SecureListener', 'false') -#set('LogLevel', 'FINEST') - -# Set the Node Manager user name and password -# =========================================== -#cd('/SecurityConfiguration/%s' % domain_name) -#set('NodeManagerUsername', username) -#set('NodeManagerPasswordEncrypted', password) - -# Write Domain -# ============ -writeDomain(domain_path) -closeTemplate() - -# Exit WLST -# ========= -exit() diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh deleted file mode 100755 index d5eb9a79ad..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - - -# If AdminServer.log does not exists, container is starting for 1st time -# So it should start NM and also associate with AdminServer -# Otherwise, only start NM (container restarted) -########### SIGTERM handler ############ -function _term() { - echo "Stopping container." - echo "SIGTERM received, shutting down the server!" - ${DOMAIN_HOME}/bin/stopWebLogic.sh -} - -########### SIGKILL handler ############ -function _kill() { - echo "SIGKILL received, shutting down the server!" - kill -9 $childPID -} - -# Set SIGTERM handler -trap _term SIGTERM - -# Set SIGKILL handler -trap _kill SIGKILL - -#Define DOMAIN_HOME -export DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME -echo "Domain Home is: " $DOMAIN_HOME - -mkdir -p $ORACLE_HOME/properties -# Create Domain only if 1st execution -if [ ! -e ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then - echo "Create Domain" - PROPERTIES_FILE=/u01/oracle/properties/domain.properties - if [ ! -e "$PROPERTIES_FILE" ]; then - echo "A properties file with the username and password needs to be supplied." - exit - fi - - # Get Username - USER=`awk '{print $1}' $PROPERTIES_FILE | grep username | cut -d "=" -f2` - if [ -z "$USER" ]; then - echo "The domain username is blank. The Admin username must be set in the properties file." - exit - fi - # Get Password - PASS=`awk '{print $1}' $PROPERTIES_FILE | grep password | cut -d "=" -f2` - if [ -z "$PASS" ]; then - echo "The domain password is blank. The Admin password must be set in the properties file." - exit - fi - - # Create an empty domain - wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-wls-domain.py - mkdir -p ${DOMAIN_HOME}/servers/${ADMIN_NAME}/security/ - chmod -R g+w ${DOMAIN_HOME} - echo "username=${USER}" >> $DOMAIN_HOME/servers/${ADMIN_NAME}/security/boot.properties - echo "password=${PASS}" >> $DOMAIN_HOME/servers/${ADMIN_NAME}/security/boot.properties - ${DOMAIN_HOME}/bin/setDomainEnv.sh -fi - -# Start Admin Server and tail the logs -${DOMAIN_HOME}/startWebLogic.sh -if [ -e ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then - echo "${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log" -fi -touch ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log -tail -f ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log - -childPID=$! -wait $childPID diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh deleted file mode 100755 index 4a2feef442..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# -#Copyright (c) 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - -if [ "$ADMINISTRATION_PORT_ENABLED" = "true" ] ; then - echo "https://{localhost:$ADMINISTRATION_PORT}/weblogic/ready" ; -else - echo "http://{localhost:$ADMIN_LISTEN_PORT}/weblogic/ready" ; -fi diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download b/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download deleted file mode 100644 index 2d74e20ec8..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download +++ /dev/null @@ -1,5 +0,0 @@ -# Download WebLogic Server Generic Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -ea1b961b8896ac2f4006921965e41ddf fmw_12.2.1.3.0_wls_Disk1_1of1.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download b/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download deleted file mode 100644 index 29195504d4..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download +++ /dev/null @@ -1,5 +0,0 @@ -# Download WebLogic Server Quick Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -a5d4811b431b2166e3e16c20c36ede09 fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/install.file b/OracleWebLogic/dockerfiles/12.2.1.3/install.file deleted file mode 100644 index 23fdba63a8..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/install.file +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. -[ENGINE] - -#DO NOT CHANGE THIS. -Response File Version=1.0.0.0.0 - -[GENERIC] - -INSTALL_TYPE=WebLogic Server -SOFTWARE ONLY TYPE=true -DECLINE_SECURITY_UPDATES=true -SECURITY_UPDATES_VIA_MYORACLESUPPORT=false diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc b/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc deleted file mode 100644 index 01f1964a55..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc +++ /dev/null @@ -1,2 +0,0 @@ -inventory_loc=/u01/oracle/.inventory -inst_group=oracle diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties b/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties deleted file mode 100644 index e4db42348c..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties +++ /dev/null @@ -1,2 +0,0 @@ -username=myweblogicuser -password=welcome1