diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 378a095329..31f68e91aa 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -1,5 +1,5 @@ # 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 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. @@ -14,6 +14,7 @@ You must first download the Oracle Server JRE binary and drop in folder `../Orac "$ 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). ### Building OHS Container Image @@ -21,7 +22,7 @@ IMPORTANT: You have to download the OHS binary and put it in place (see .downloa 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.4.0" + "$ sh buildDockerImage.sh -v 12.2.1.4.0" IMPORTANT: The resulting image will have a pre-configured domain. @@ -33,15 +34,10 @@ 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.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" - + "$ 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/12214/webtier/develop-plugin/oracle.htm#PLGWL553) @@ -50,19 +46,17 @@ If you want to start the OHS container with some pre-specified mod_weblogic conf 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.4.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 " - + "$ docker stop " To look at the Container logs run: "$ docker logs --details " - ## Support Oracle HTTP Server in containers is supported by Oracle. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index cfc62e6200..c48fab93eb 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -57,7 +57,6 @@ ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin # Copy packages to the new drive # ------------------------------------------------------- -WORKDIR /u01 COPY $OHS_PKG install.file oraInst.loc /u01/ # Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages @@ -73,6 +72,7 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ # Go to /u01 as user 'oracle' to proceed with OHS installation #-------------------------------------------------------- USER oracle +WORKDIR /u01 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 && \ diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index 1974c3fce2..2eb328c8ac 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -38,7 +38,7 @@ checksumPackages() { # md5sum -c *.download # if [ "$?" -ne 0 ]; then MDSUM="md5sum -c *.download" - if ["$MDSUM" -ne 0 ]; then + 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 $MDSUM @@ -118,10 +118,6 @@ BUILD_END=$(date '+%s') BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START` echo "" - -cat << EOF - OHS Standalone Docker Image for version: $VERSION is ready to be used. - - --> $IMAGE_NAME - - Build completed in $BUILD_ELAPSED seconds. +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/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index 34e5f62325..d7870e0bf7 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -28,12 +28,12 @@ ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" # Copy supplemental package and scripts # -------------------------------- -WORKDIR /u01 COPY $PATCH_PKG /u01/ # Installation of Supplemental Quick Installer # -------------------------------------------- USER oracle +WORKDIR /u01 RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ rm /u01/$PATCH_PKG diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index 19d0813c11..b97dfd1856 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -1,5 +1,5 @@ # 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. @@ -10,8 +10,8 @@ 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 ." + + "$ docker build -t oracle/ohs:12214-patch ." ### Providing the Node Manager password @@ -32,12 +32,11 @@ To start the OHS container with the patched image, run the following command: ### Stopping the OHS instance To stop the OHS instance, execute the following command: - "$ docker stop " - + "$ docker stop " To look at the Container logs run: - "$ docker logs --details " + "$ docker logs --details " ## Support