From b72e964f87730d5c0cb870b2c863e0a022d7ede6 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Wed, 27 May 2020 17:32:59 -0400 Subject: [PATCH] Add Healthcheck to WLS images and add 14.1.1.0 JRE 8 installers (#1625) * Add HEALTHCHECK to Admin and Managed server containers --- .../dockerfiles/12.2.1.3/Dockerfile | 19 ++- .../container-scripts/get_healthcheck_url.sh | 14 +++ .../12.2.1.3/properties/domain.properties | 2 +- .../12.2.1.3/run_managed_server.sh | 5 +- .../dockerfiles/12.2.1.4/Dockerfile | 17 ++- .../container-scripts/get_healthcheck_url.sh | 14 +++ .../12.2.1.4/properties/domain.properties | 2 +- .../dockerfiles/12.2.1.4/run_admin_server.sh | 4 +- .../12.2.1.4/run_managed_server.sh | 3 +- .../dockerfiles/buildDockerImage.sh | 4 +- .../dockerfiles/12.2.1.3/Dockerfile.developer | 23 ++-- .../dockerfiles/12.2.1.3/Dockerfile.generic | 21 ++-- .../container-scripts/get_healthcheck_url.sh | 11 ++ .../dockerfiles/12.2.1.4/Checksum.generic | 6 + .../dockerfiles/12.2.1.4/Dockerfile.developer | 22 ++-- .../dockerfiles/12.2.1.4/Dockerfile.generic | 20 ++-- .../dockerfiles/12.2.1.4/Dockerfile.slim | 20 ++-- .../container-scripts/get_healthcheck_url.sh | 11 ++ ...file.developer => Dockerfile.developer-11} | 8 +- .../14.1.1.0/Dockerfile.developer-8 | 108 +++++++++++++++++ ...ckerfile.generic => Dockerfile.generic-11} | 8 +- .../dockerfiles/14.1.1.0/Dockerfile.generic-8 | 108 +++++++++++++++++ .../{Dockerfile.slim => Dockerfile.slim-11} | 8 +- .../dockerfiles/14.1.1.0/Dockerfile.slim-8 | 110 ++++++++++++++++++ OracleWebLogic/dockerfiles/14.1.1.0/README.md | 18 +-- .../container-scripts/get_healthcheck_url.sh | 11 ++ .../dockerfiles/buildDockerImage.sh | 49 ++++++-- .../samples/12213-domain/Dockerfile | 49 ++++---- OracleWebLogic/samples/12213-domain/README.md | 5 +- .../container-scripts/create-wls-domain.py | 15 +-- .../container-scripts/createWLSDomain.sh | 20 ++-- .../container-scripts/get_healthcheck_url.sh | 14 +++ .../12213-domain/container-scripts/setEnv.sh | 17 +-- .../container-scripts/startManagedServer.sh | 19 +-- .../container-scripts/waitForAdminServer.sh | 6 +- .../12213-domain/properties/domain.properties | 8 +- .../samples/12213-domain/run_admin_server.sh | 17 ++- .../12213-domain/run_managed_server.sh | 16 +-- 38 files changed, 672 insertions(+), 160 deletions(-) create mode 100755 OracleFMWInfrastructure/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh create mode 100755 OracleFMWInfrastructure/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh create mode 100755 OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh create mode 100644 OracleWebLogic/dockerfiles/12.2.1.4/Checksum.generic create mode 100755 OracleWebLogic/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh rename OracleWebLogic/dockerfiles/14.1.1.0/{Dockerfile.developer => Dockerfile.developer-11} (92%) create mode 100755 OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-8 rename OracleWebLogic/dockerfiles/14.1.1.0/{Dockerfile.generic => Dockerfile.generic-11} (92%) create mode 100755 OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-8 rename OracleWebLogic/dockerfiles/14.1.1.0/{Dockerfile.slim => Dockerfile.slim-11} (92%) create mode 100755 OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-8 create mode 100755 OracleWebLogic/dockerfiles/14.1.1.0/container-scripts/get_healthcheck_url.sh create mode 100755 OracleWebLogic/samples/12213-domain/container-scripts/get_healthcheck_url.sh diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile index 97fa3b0547..eea260eeb8 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile @@ -1,6 +1,6 @@ -#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2014, 2020, Oracle and/or its affiliates. # -# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # ORACLE DOCKERFILES PROJECT # -------------------------- @@ -21,10 +21,14 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli - +# Labels +# ------ +LABEL "provider"="Oracle" \ + "maintainer"="Monica Riccelli " \ + "issues"="https://github.com/oracle/docker-images/issues" \ + "port.admin.listen"="7001" \ + "port.administration"="9002" \ + "port.managed.server"="8001" # Common environment variables required for this build # ---------------------------------------------------- @@ -60,6 +64,7 @@ FROM oracle/serverjre:8 ENV ORACLE_HOME=/u01/oracle \ VOLUME_DIR=/u01/oracle/user_projects \ SCRIPT_FILE=/u01/oracle/container-scripts/* \ + HEALTH_SCRIPT_FILE=/u01/oracle/container-scripts/get_healthcheck_url.sh \ DOMAIN_NAME="${DOMAIN_NAME:-infra_domain}" \ ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \ ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \ @@ -68,6 +73,7 @@ ENV ORACLE_HOME=/u01/oracle \ ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" \ MANAGEDSERVER_PORT="${MANAGEDSERVER_PORT:-8001}" \ MANAGED_NAME="${MANAGED_NAME:-infraServer1}" \ + MANAGED_SERVER_CONTAINER="${MANAGED_SERVER_CONTAINER:-false}" \ RCUPREFIX="${RCUPREFIX:-INFRA01}" \ PRODUCTION_MODE="${PRODUCTION_MODE:-prod}" \ CONNECTION_STRING=${CONNECTION_STRING:-InfraDB:1521/InfraPDB1.us.oracle.com} \ @@ -91,5 +97,6 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 RUN chmod +xr $SCRIPT_FILE USER oracle +HEALTHCHECK --start-period=4m --interval=1m CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 WORKDIR ${ORACLE_HOME} CMD ["/u01/oracle/container-scripts/createOrStartInfraDomain.sh"] diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..6c65ff3f8b --- /dev/null +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,14 @@ +#!/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 [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then + echo "http://{localhost:$MANAGEDSERVER_PORT}/weblogic/ready" ; +elif [ "$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/OracleFMWInfrastructure/dockerfiles/12.2.1.3/properties/domain.properties b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/properties/domain.properties index 83f30510f3..944c0383b5 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/properties/domain.properties +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/properties/domain.properties @@ -6,7 +6,7 @@ ADMINISTRATION_PORT_ENABLED=true ADMINISTRATION_PORT=9002 MANAGEDSERVER_PORT=8001 MANAGED_NAME=infraServer1 -RCUPREFIX=INFRA31 +RCUPREFIX=INFRA10 PRODUCTION_MODE=dev CONNECTION_STRING=InfraDB:1521/InfraPDB1.us.oracle.com DOMAIN_HOST_VOLUME=/home/username/domain_home diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/run_managed_server.sh b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/run_managed_server.sh index baf776632c..01cf5d9646 100755 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/run_managed_server.sh +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/run_managed_server.sh @@ -1,8 +1,8 @@ #! /bin/bash # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2020, Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # Pass in the managed server name to run and the mapped port @@ -31,6 +31,7 @@ managed_name() { admin_host managed_name +ENV_ARG="${ENV_ARG} -e MANAGED_NAME=$managedname -e MANAGED_SERVER_CONTAINER=true" echo "docker run -d -p 9802:8002 --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --name ${managedname} oracle/fmw-infrastructure:12.2.1.3 startManagedServer.sh" diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/Dockerfile b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/Dockerfile index 019b12fda7..4bb4b37e0e 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/Dockerfile +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/Dockerfile @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -21,10 +21,14 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli - +# Labels +# ------ +LABEL "provider"="Oracle" \ + "maintainer"="Monica Riccelli " \ + "issues"="https://github.com/oracle/docker-images/issues" \ + "port.admin.listen"="7001" \ + "port.administration"="9002" \ + "port.managed.server"="8001" # Common environment variables required for this build # ---------------------------------------------------- @@ -61,6 +65,7 @@ FROM oracle/serverjre:8 ENV ORACLE_HOME=/u01/oracle \ VOLUME_DIR=/u01/oracle/user_projects \ SCRIPT_FILE=/u01/oracle/container-scripts/* \ + HEALTH_SCRIPT_FILE=/u01/oracle/container-scripts/get_healthcheck_url.sh \ DOMAIN_NAME="${DOMAIN_NAME:-infra_domain}" \ ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \ ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \ @@ -69,6 +74,7 @@ ENV ORACLE_HOME=/u01/oracle \ ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" \ MANAGEDSERVER_PORT="${MANAGEDSERVER_PORT:-8001}" \ MANAGED_NAME="${MANAGED_NAME:-infraServer1}" \ + MANAGED_SERVER_CONTAINER="${MANAGED_SERVER_CONTAINER:-false}" \ RCUPREFIX="${RCUPREFIX:-INFRA01}" \ PRODUCTION_MODE="${PRODUCTION_MODE:-prod}" \ CONNECTION_STRING=${CONNECTION_STRING:-InfraDB:1521/InfraPDB1.us.oracle.com} \ @@ -92,5 +98,6 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 RUN chmod +xr $SCRIPT_FILE USER oracle +HEALTHCHECK --start-period=4m --interval=1m CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 WORKDIR ${ORACLE_HOME} CMD ["/u01/oracle/container-scripts/createOrStartInfraDomain.sh"] diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..6c65ff3f8b --- /dev/null +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,14 @@ +#!/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 [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then + echo "http://{localhost:$MANAGEDSERVER_PORT}/weblogic/ready" ; +elif [ "$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/OracleFMWInfrastructure/dockerfiles/12.2.1.4/properties/domain.properties b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/properties/domain.properties index 83f30510f3..944c0383b5 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/properties/domain.properties +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/properties/domain.properties @@ -6,7 +6,7 @@ ADMINISTRATION_PORT_ENABLED=true ADMINISTRATION_PORT=9002 MANAGEDSERVER_PORT=8001 MANAGED_NAME=infraServer1 -RCUPREFIX=INFRA31 +RCUPREFIX=INFRA10 PRODUCTION_MODE=dev CONNECTION_STRING=InfraDB:1521/InfraPDB1.us.oracle.com DOMAIN_HOST_VOLUME=/home/username/domain_home diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_admin_server.sh b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_admin_server.sh index a6491b109b..98b0140ec6 100755 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_admin_server.sh +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_admin_server.sh @@ -40,7 +40,7 @@ admin_host() { admin_host domain_host_volume -echo " docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.3" +echo " docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.4" -docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.3 +docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.4 diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_managed_server.sh b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_managed_server.sh index 69240f4458..01cf5d9646 100755 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_managed_server.sh +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.4/run_managed_server.sh @@ -1,6 +1,6 @@ #! /bin/bash # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -31,6 +31,7 @@ managed_name() { admin_host managed_name +ENV_ARG="${ENV_ARG} -e MANAGED_NAME=$managedname -e MANAGED_SERVER_CONTAINER=true" echo "docker run -d -p 9802:8002 --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --name ${managedname} oracle/fmw-infrastructure:12.2.1.3 startManagedServer.sh" diff --git a/OracleFMWInfrastructure/dockerfiles/buildDockerImage.sh b/OracleFMWInfrastructure/dockerfiles/buildDockerImage.sh index cceeca591a..83e1f7d256 100755 --- a/OracleFMWInfrastructure/dockerfiles/buildDockerImage.sh +++ b/OracleFMWInfrastructure/dockerfiles/buildDockerImage.sh @@ -4,7 +4,7 @@ # Author: monica.riccelli@oracle.com # Description: script to build a Docker image for FMW Infrastructure # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # #Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. @@ -23,7 +23,7 @@ Parameters: LICENSE UPL 1.0 -Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2019, 2020, Oracle and/or its affiliates. EOF exit 0 diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer index 3dfced6de5..c301043003 100644 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer +++ b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -29,9 +29,14 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# 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) # -------------------------------------------------------------------- @@ -70,6 +75,7 @@ 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 @@ -80,7 +86,7 @@ ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ DEBUG_FLAG=true \ PRODUCTION_MODE=dev \ ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ - ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" + ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" # Setup filesystem and oracle user # Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation @@ -94,13 +100,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic index 9d5c8dced1..4d2642f169 100644 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic +++ b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -25,13 +25,16 @@ # 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 -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# 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) # -------------------------------------------------------------------- @@ -71,6 +74,7 @@ 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 @@ -93,13 +97,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. 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 new file mode 100755 index 0000000000..4a2feef442 --- /dev/null +++ b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,11 @@ +#!/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.4/Checksum.generic b/OracleWebLogic/dockerfiles/12.2.1.4/Checksum.generic new file mode 100644 index 0000000000..70d399b7ca --- /dev/null +++ b/OracleWebLogic/dockerfiles/12.2.1.4/Checksum.generic @@ -0,0 +1,6 @@ +# Download WebLogic Server Generic Installer 12.2.1.4 +# +# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html +# +4198256da12e06841611d9c1a1ab85eb fmw_12.2.1.4.0_wls_Disk1_1of1.zip + diff --git a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.developer b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.developer index f44f33dd72..e833b199ef 100644 --- a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.developer +++ b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.developer @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -29,9 +29,13 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# 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) # -------------------------------------------------------------------- @@ -70,6 +74,7 @@ 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 @@ -80,7 +85,7 @@ ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ DEBUG_FLAG=true \ PRODUCTION_MODE=dev \ ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ - ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" + ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" # Setup filesystem and oracle user # Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation @@ -94,13 +99,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.generic b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.generic index 4afe0e7a99..c0e5184a4d 100644 --- a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.generic +++ b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.generic @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -29,9 +29,13 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# 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) # -------------------------------------------------------------------- @@ -71,6 +75,7 @@ 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 @@ -93,13 +98,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.slim b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.slim index 380881cb10..adf095e819 100644 --- a/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.slim +++ b/OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.slim @@ -1,4 +1,4 @@ -#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -29,9 +29,13 @@ # ---------------------------------------------------------------------------------------------- FROM oracle/serverjre:8 as builder -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# 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) # -------------------------------------------------------------------- @@ -71,6 +75,7 @@ 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 @@ -95,13 +100,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh b/OracleWebLogic/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..4a2feef442 --- /dev/null +++ b/OracleWebLogic/dockerfiles/12.2.1.4/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,11 @@ +#!/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/14.1.1.0/Dockerfile.developer b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-11 similarity index 92% rename from OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer rename to OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-11 index c2010d491e..aa151d6a33 100755 --- a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-11 @@ -69,6 +69,7 @@ FROM oracle/jdk:11 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 @@ -93,13 +94,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-8 b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-8 new file mode 100755 index 0000000000..ab97e6658b --- /dev/null +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.developer-8 @@ -0,0 +1,108 @@ +# 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. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This is the Dockerfile for WebLogic 14.1.1.0 Quick Install Distro +# +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# fmw_14.1.1.0.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 +# +# 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:14.1.1.0-developer . +# +# IMPORTANT +# --------- +# The resulting image of this Dockerfile contains a WLS Empty Domain. +# +# From the Oracle Docker GitHub Project +# -------------------------------------- +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 -p /u01 && \ + chmod a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV FMW_PKG=fmw_14.1.1.0.0_wls_quick_Disk1_1of1.zip \ + FMW_JAR=fmw_14.1.1.0.0_wls_quick.jar + +# Copy packages +# ------------- +COPY $FMW_PKG install.file oraInst.loc /u01/ +RUN chown oracle:oracle -R /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 a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ + chown oracle:oracle /u01 + +COPY --from=builder --chown=oracle:oracle /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:oracle $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/14.1.1.0/Dockerfile.generic b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-11 similarity index 92% rename from OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic rename to OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-11 index 753be65295..777f4acf16 100755 --- a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-11 @@ -71,6 +71,7 @@ FROM oracle/jdk:11 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 @@ -93,13 +94,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-8 b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-8 new file mode 100755 index 0000000000..61f9fdfb9a --- /dev/null +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.generic-8 @@ -0,0 +1,108 @@ +# 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. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This is the Dockerfile for Oracle WebLogic Server 14.1.1.0 Generic Distro +# +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# fmw_14.1.1.0.0_wls_Disk1_1of1.zip +# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.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:14.1.1.0-generic . +# +# IMPORTANT +# --------- +# The resulting image of this Dockerfile contains a WLS Empty Domain. +# +# From the Oracle Docker GitHub Project +# -------------------------------------- +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 -p /u01 && \ + chmod a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV FMW_PKG=fmw_14.1.1.0.0_wls_Disk1_1of1.zip \ + FMW_JAR=fmw_14.1.1.0.0_wls.jar + +# Copy packages +# ------------- +COPY $FMW_PKG install.file oraInst.loc /u01/ +RUN chown oracle:oracle -R /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 a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ + chown oracle:oracle /u01 + +COPY --from=builder --chown=oracle:oracle /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:oracle $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/14.1.1.0/Dockerfile.slim b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-11 similarity index 92% rename from OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim rename to OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-11 index 44b6c2e9bc..599f530d76 100755 --- a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-11 @@ -71,6 +71,7 @@ FROM oracle/jdk:11 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 @@ -95,13 +96,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01 # Copy scripts #------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/ +COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ -RUN chmod +xr $SCRIPT_FILE && \ - chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py +RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ + chown oracle:oracle $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. diff --git a/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-8 b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-8 new file mode 100755 index 0000000000..fff6a5ae7a --- /dev/null +++ b/OracleWebLogic/dockerfiles/14.1.1.0/Dockerfile.slim-8 @@ -0,0 +1,110 @@ +# 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. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This is the Dockerfile for Oracle WebLogic Server 14.1.1.0 Slim Distro +# +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# fmw_14.1.1.0.0_wls_quick_slim_Disk1_1of1.zip +# Download the Slim installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html +# +# HOW TO BUILD THIS IMAGE +# ----------------------- +# Put all downloaded files in the same directory as this Dockerfile +# Run: +# $ docker build -f Dockerfile.slim -t oracle/weblogic:14.1.1.0-slim . +# +# IMPORTANT +# --------- +# The resulting image of this Dockerfile contains a WLS Empty Domain. +# +# From the Oracle Docker GitHub Project +# ---------------------------------------- +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 -p /u01 && \ + chmod a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV FMW_PKG=fmw_14.1.1.0.0_wls_quick_slim_Disk1_1of1.zip \ + FMW_JAR=fmw_14.1.1.0.0_wls_quick_slim.jar + +# Copy packages +# ------------- +COPY $FMW_PKG install.file oraInst.loc /u01/ +RUN chown oracle:oracle -R /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}" \ + ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ + ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" \ + DEBUG_flag=false \ + PRODUCTION_MODE=prod + +# Setup filesystem and oracle user +# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation +# ------------------------------------------------------------ +RUN mkdir -p /u01 && \ + chmod a+xr /u01 && \ + useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ + chown oracle:oracle /u01 + +COPY --from=builder --chown=oracle:oracle /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:oracle $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/14.1.1.0/README.md b/OracleWebLogic/dockerfiles/14.1.1.0/README.md index ccd30fdbe5..81b11e8f2e 100755 --- a/OracleWebLogic/dockerfiles/14.1.1.0/README.md +++ b/OracleWebLogic/dockerfiles/14.1.1.0/README.md @@ -1,13 +1,13 @@ Oracle WebLogic Server on Docker ================================= -These Docker configurations have been used to create the Oracle WebLogic Server (WLS) image. Providing this WLS image facilitates the configuration and environment setup for DevOps users. This project includes the installation and creation of an empty WebLogic Server domain (an Administration Server only). These Oracle WebLogic Server 14.1.1.0 images are based on Oracle Linux and Oracle Oracle JDK 11. +These Docker configurations have been used to create the Oracle WebLogic Server (WLS) image. Providing this WLS image facilitates the configuration and environment setup for DevOps users. This project includes the installation and creation of an empty WebLogic Server domain (an Administration Server only). These Oracle WebLogic Server 14.1.1.0 images are based on Oracle Linux and Oracle JRE 8 (Server) or Oracle JDK 11. The certification of Oracle WebLogic Server on Docker does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize, tweak, or create from scratch, new scripts and Dockerfiles. For more information on the certification, please see the [Oracle WebLogic Server on Docker certification whitepaper](http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-server-docker-containers-2491959.pdf) and [The WebLogic Server Blog](https://blogs.oracle.com/WebLogicServer/) for updates. ## How to build and run -This project offers sample Dockerfiles for Oracle WebLogic Server 14c (14.1.1.0). It provides at least one Dockerfile for the `developer` distribution, a second Dockerfile for the `generic` distribution, and a third Dockerfile for the `slim` distribution. +This project offers sample Dockerfiles for Oracle WebLogic Server 14.1.1.0. It provides at least one Dockerfile for the `developer` distribution, a second Dockerfile for the `generic` distribution, and a third Dockerfile for the `slim` distribution. 1- The WebLogic `generic` image is supported for `development` and `production` deployment of WebLogic configurations using Docker. It contains the same binaries as those installed by the WebLogic generic installer. The WebLogic generic image is primarily intended for WebLogic domains managed with the WebLogic Kubernetes Operator, when WLS console-based monitoring, and possibly configuration, is required. All servers within a domain managed with the Operator will use the same WebLogic image. Support is also provided for environments where Kubernetes and/or the WebLogic Kubernetes Operator is not being used. @@ -21,12 +21,12 @@ To assist in building the images, you can use the [`buildDockerImage.sh`](docker 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/`). WebLogic Server 14.1.1.0 supports Java SE 11. If you want to run WebLogic Server on Oracle JDK 11 image, you can either build the image by using the Dockerfile in [`../../../OracleJava/java11`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-11) or pull the jdk 11 image from the Oracle Container Registry. There is no longer a Oracle Server JRE for Java SE 11, it is bundled into Oracle JDK 11. +**IMPORTANT:** You must download the binary of Oracle WebLogic Server and put it in place (see `.download` files inside `dockerfiles/`). WebLogic Server 14.1.1.0 supports both Java SE 8 or 11. If you want to run WebLogic Server on Oracle Server JRE 8, you must build the image by using the Dockerfile in [`../../../OracleJava/java8`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-8). There is no longer a Oracle Server JRE for Java SE 11, it is bundled into Oracle JDK 11. If you want to run images of WebLogic based on the Oracle JDK 11 image, you must build the image by using the Dockerfile in [`../../../OracleJava/java11`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-11). Before you build, select the version and distribution for which you want to build an image, then download the required packages (see `.download` files) and locate them in the folder of your distribution version of choice. Then, from the `dockerfiles` folder, run the `buildDockerImage.sh` script as root. $ sh buildDockerImage.sh - Usage: buildDockerImage.sh -v [version] [-d | -g | -m] [-s] + Usage: buildDockerImage.sh -v [version] [-d | -g | -m] [-s] [-j] Builds a Docker Image for Oracle WebLogic Server. Parameters: @@ -35,6 +35,7 @@ Before you build, select the version and distribution for which you want to buil -d: creates image based on 'developer' distribution -g: creates image based on 'generic' distribution -m: creates image based on 'slim' distribution + -j: choose '8' to create a 14.1.1.0 image with JDK 8 or '11' to create a 14.1.1.0 image with JDK 11. -c: enables Docker image layer cache during build -s: skips the MD5 check of packages @@ -42,20 +43,21 @@ Before you build, select the version and distribution for which you want to buil LICENSE UPL 1.0 - Copyright (c) 2014-2020 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 2020, Oracle and/or its affiliates **IMPORTANT:** The resulting images will have a single server domain (Administration Server only), by default. 1. To build the `14.1.1.0`image, from `dockerfiles`, call: - `$ sh buildDockerImage.sh -v 14.1.1.0 -d + `$ sh buildDockerImage.sh -v 14.1.1.0 -d -j 11` 2. Verify that you now have this image in place with: `$ docker images` - If the WebLogic imagte is built extending Oracle JDK 11, then the built image will be called oracle/weblogic:14.1.1.0-developer + If the WebLogic image is built extending Oracle Server JRE 8, then the built image will be called oracle/weblogic:14.1.1.0-developer-8 + If the WebLogic image is built extending Oracle JDK 11, then the built image will be called oracle/weblogic:14.1.1.0-developer-11 ### Running a single server domain from the image @@ -92,4 +94,4 @@ Run the WLS Administration Console: In your browser, enter `https://xxx.xx.x.x:9002/console`. Your browser will request that you accept the Security Exception. To avoid the Security Exception, you must update the WebLogic Server SSL configuration with a custom identity certificate. ## Copyright -Copyright (c) 2020 Oracle and/or its affiliates. +Copyright (c) 2020, Oracle and/or its affiliates. diff --git a/OracleWebLogic/dockerfiles/14.1.1.0/container-scripts/get_healthcheck_url.sh b/OracleWebLogic/dockerfiles/14.1.1.0/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..4a2feef442 --- /dev/null +++ b/OracleWebLogic/dockerfiles/14.1.1.0/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,11 @@ +#!/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/buildDockerImage.sh b/OracleWebLogic/dockerfiles/buildDockerImage.sh index 9d14a61f35..80b9238668 100755 --- a/OracleWebLogic/dockerfiles/buildDockerImage.sh +++ b/OracleWebLogic/dockerfiles/buildDockerImage.sh @@ -4,7 +4,7 @@ # Author: bruno.borges@oracle.com # Description: script to build a Docker image for WebLogic # -#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. +#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. # @@ -12,7 +12,7 @@ usage() { cat << EOF -Usage: buildDockerImage.sh -v [version] [-d | -g | -m ] [-s] [-c] +Usage: buildDockerImage.sh -v [version] [-d | -g | -m ] [-j] [-s] [-c] Builds a Docker Image for Oracle WebLogic. Parameters: @@ -20,6 +20,7 @@ Parameters: Choose one of: $(for i in $(ls -d */); do echo -n "${i%%/} "; done) -d: creates image based on 'developer' distribution -g: creates image based on 'generic' distribution + -j: choose '8' to create a 14.1.1.0 image with JDK 8 or '11' to create a 14.1.1.0 image with JDK 11. -m: creates image based on 'slim' distribution -c: enables Docker image layer cache during build -s: skips the MD5 check of packages @@ -28,13 +29,22 @@ Parameters: LICENSE UPL 1.0 -Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2014, 2020, Oracle and/or its affiliates. EOF exit 0 } # Validate packages +validateJDK() { + if [ "$VERSION" == "14.1.1.0" ]; then + if [ "$JDKVER" != 8 -a "$JDKVER" != 11 ]; then + echo "WebLogic Server 14.1.1.0 supports JDK 8 and 11. JDK version $JDKVER is not supported." + exit 1 + fi + fi +} + checksumPackages() { echo "Checking if required packages are present and valid..." md5sum -c Checksum.$DISTRIBUTION @@ -52,30 +62,41 @@ DEVELOPER=0 GENERIC=0 SLIM=0 VERSION="12.2.1.4" +JDKVER=8 SKIPMD5=0 NOCACHE=true -while getopts "hcsdgmiv:" optname; do +while getopts "hsdgmc:j:v:" optname; do case "$optname" in "h") usage ;; "s") SKIPMD5=1 + echo "Set- Skip md5sum" ;; "d") DEVELOPER=1 + echo "Set- Distribution:Developer" ;; "g") GENERIC=1 + echo "Set- Distribution:Generic" + ;; + "j") + JDKVER="$OPTARG" + echo "Set- JDK Version $JDKVER" ;; "m") SLIM=1 + echo "Set- Distribution:Slim" ;; "v") VERSION="$OPTARG" + echo "Set- WebLogic's Version $VERSION" ;; "c") NOCACHE=false + echo "Set- NOCACHE to false" ;; *) # Should not occur @@ -98,8 +119,21 @@ else exit 1 fi +# For WLS 14.1.1.0 Validate JDK is 8 or 11 +validateJDK + +# Which JDK FOR VERSION 14.1.1.0 +if [ "$VERSION" == "14.1.1.0" ]; then + DIST="$DISTRIBUTION-$JDKVER" + echo "Version= $VERSION Distribution= $DIST" +else + DIST="$DISTRIBUTION" + echo "Version= $VERSION Distribution= $DIST" +fi + + # WebLogic Image Name -IMAGE_NAME="oracle/weblogic:$VERSION-$DISTRIBUTION" +IMAGE_NAME="oracle/weblogic:$VERSION-$DIST" # Go into version folder cd $VERSION @@ -138,10 +172,11 @@ fi # BUILDING THE IMAGE # # ################## # echo "Building image '$IMAGE_NAME' ..." +echo "Building image using Dockerfile.'$DIST'" # BUILD THE IMAGE (replace all environment variables) BUILD_START=$(date '+%s') -docker build --force-rm=$NOCACHE --no-cache=$NOCACHE $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile.$DISTRIBUTION . || { +docker build --force-rm=$NOCACHE --no-cache=$NOCACHE $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile.$DIST . || { echo "There was an error building the image." exit 1 } @@ -152,7 +187,7 @@ echo "" if [ $? -eq 0 ]; then cat << EOF - WebLogic Docker Image for '$DISTRIBUTION' version $VERSION is ready to be extended: + WebLogic Docker Image for '$DIST' version $VERSION is ready to be extended: --> $IMAGE_NAME diff --git a/OracleWebLogic/samples/12213-domain/Dockerfile b/OracleWebLogic/samples/12213-domain/Dockerfile index 1d004c08bf..0c8ea1f910 100644 --- a/OracleWebLogic/samples/12213-domain/Dockerfile +++ b/OracleWebLogic/samples/12213-domain/Dockerfile @@ -1,6 +1,6 @@ -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # ORACLE DOCKERFILES PROJECT # -------------------------- @@ -20,41 +20,44 @@ # ---- FROM oracle/weblogic:12.2.1.3-developer -# Maintainer -# ---------- -MAINTAINER Monica Riccelli +# Labels +# ------ +LABEL "provider"="Oracle" \ + "maintainer"="Monica Riccelli " \ + "issues"="https://github.com/oracle/docker-images/issues" \ + "port.admin.listen"="7001" \ + "port.administration"="9002" \ + "port.managed.server"="8001" # WLS Configuration # ----------------- -ENV CUSTOM_DOMAIN_NAME="${CUSTOM_DOMAIN_NAME:-base_domain}" \ - CUSTOM_DOMAIN_ROOT="/u01/oracle/user_projects/domains" \ - CUSTOM_ADMIN_PORT="${CUSTOM_ADMIN_PORT:-7001}" \ - CUSTOM_ADMIN_NAME="${CUSTOM_ADMIN_NAME:-AdminServer}" \ - CUSTOM_ADMIN_HOST="${CUSTOM_ADMIN_HOST:-AdminContainer}" \ - CUSTOM_MANAGED_SERVER_PORT="${CUSTOM_MANAGED_SERVER_PORT:-8001}" \ - CUSTOM_MANAGED_SERVER_NAME_BASE="${CUSTOM_MANAGED_SERVER_NAME_BASE:-MS}" \ - CUSTOM_CONFIGURED_MANAGED_SERVER_COUNT="${CUSTOM_CONFIGURED_MANAGED_SERVER_COUNT:-2}" \ - CUSTOM_MANAGED_NAME="${CUSTOM_MANAGED_NAME:-MS1}" \ - CUSTOM_CLUSTER_NAME="${CUSTOM_CLUSTER_NAME:-cluster1}" \ - CUSTOM_CLUSTER_TYPE="${CUSTOM_CLUSTER_TYPE:-DYNAMIC}" \ - CUSTOM_PRODUCTION_MODE_ENABLED="${CUSTOM_PRODUCTION_MODE_ENABLED:-prod}" \ +ENV DOMAIN_ROOT="/u01/oracle/user_projects/domains" \ + ADMIN_HOST="${ADMIN_HOST:-AdminContainer}" \ + MANAGED_SERVER_PORT="${MANAGED_SERVER_PORT:-8001}" \ + MANAGED_SERVER_NAME_BASE="${MANAGED_SERVER_NAME_BASE:-MS}" \ + MANAGED_SERVER_CONTAINER="${MANAGED_SERVER_CONTAINER:-false}" \ + CONFIGURED_MANAGED_SERVER_COUNT="${CONFIGURED_MANAGED_SERVER_COUNT:-2}" \ + MANAGED_NAME="${MANAGED_NAME:-MS1}" \ + CLUSTER_NAME="${CLUSTER_NAME:-cluster1}" \ + CLUSTER_TYPE="${CLUSTER_TYPE:-DYNAMIC}" \ PROPERTIES_FILE_DIR="/u01/oracle/properties" \ - CUSTOM_JAVA_OPTIONS="-Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false" \ - CUSTOM_PATH="$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/container-scripts" + JAVA_OPTIONS="-Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false" \ + PATH="$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/container-scripts" # Add files required to build this image COPY --chown=oracle:oracle container-scripts/* /u01/oracle/container-scripts/ +COPY --chown=oracle:oracle container-scripts/get_healthcheck_url.sh /u01/oracle/get_healthcheck_url.sh #Create directory where domain will be written to USER root -RUN mkdir -p $CUSTOM_DOMAIN_ROOT && \ - chown -R oracle:oracle $CUSTOM_DOMAIN_ROOT/.. && \ - chmod -R a+xwr $CUSTOM_DOMAIN_ROOT/.. && \ +RUN mkdir -p $DOMAIN_ROOT && \ + chown -R oracle:oracle $DOMAIN_ROOT/.. && \ + chmod -R a+xwr $DOMAIN_ROOT/.. && \ mkdir -p $ORACLE_HOME/properties && \ chmod -R a+r $ORACLE_HOME/properties && \ chmod +x /u01/oracle/container-scripts/* -VOLUME $CUSTOM_DOMAIN_ROOT +VOLUME $DOMAIN_ROOT USER oracle WORKDIR $ORACLE_HOME diff --git a/OracleWebLogic/samples/12213-domain/README.md b/OracleWebLogic/samples/12213-domain/README.md index 7df1861e35..e179ddebc5 100644 --- a/OracleWebLogic/samples/12213-domain/README.md +++ b/OracleWebLogic/samples/12213-domain/README.md @@ -27,7 +27,7 @@ A prerequisite to building the 12213-weblogic-domain-in-volume image is having a LICENSE UPL 1.0 - Copyright (c) 2014,2019 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 2020, Oracle and/or its affiliates. #### Providing the Administration Server user name and password and Database username and password The administration server user name and password must be supplied in a `domain_security.properties` file. This file should be 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. @@ -59,6 +59,7 @@ You can override the default values of the following parameters during runtime i * `ADMIN_HOST` * `MANAGED_SERVER_PORT` * `MANAGED_SERVER_NAME_BASE` + * `MANAGED_SERVER_CONTAINER` * `CONFIGURED_MANAGED_SERVER_COUNT` * `CLUSTER_NAME` * `CLUSTER_TYPE` @@ -96,4 +97,4 @@ We are supplying scripts `run_admin_server.sh` and `run_managed_server.sh` to fa ## Copyright -Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2019, 2020, Oracle and/or its affiliates. diff --git a/OracleWebLogic/samples/12213-domain/container-scripts/create-wls-domain.py b/OracleWebLogic/samples/12213-domain/container-scripts/create-wls-domain.py index 8dbe2c5a3a..8e10ab80cf 100644 --- a/OracleWebLogic/samples/12213-domain/container-scripts/create-wls-domain.py +++ b/OracleWebLogic/samples/12213-domain/container-scripts/create-wls-domain.py @@ -1,6 +1,6 @@ -#Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # WebLogic on Docker Default Domain # @@ -23,14 +23,14 @@ def getEnvVar(var): # This python script is used to create a WebLogic domain domain_name = DOMAIN_NAME admin_server_name = ADMIN_NAME -admin_port = int(ADMIN_PORT) +admin_port = int(ADMIN_LISTEN_PORT) server_port = int(MANAGED_SERVER_PORT) managed_server_name_base = MANAGED_SERVER_NAME_BASE number_of_ms = int(CONFIGURED_MANAGED_SERVER_COUNT) domain_path = os.environ.get("DOMAIN_HOME") cluster_name = CLUSTER_NAME cluster_type = CLUSTER_TYPE -production_mode_enabled = PRODUCTION_MODE_ENABLED +production_mode = PRODUCTION_MODE print('domain_path : [%s]' % domain_path); print('domain_name : [%s]' % domain_name); @@ -41,7 +41,7 @@ def getEnvVar(var): print('number_of_ms : [%s]' % number_of_ms); print('cluster_type : [%s]' % cluster_type); print('managed_server_name_base : [%s]' % managed_server_name_base); -print('production_mode_enabled : [%s]' % production_mode_enabled); +print('production_mode : [%s]' % production_mode); # Open default domain template # ============================ @@ -125,10 +125,7 @@ def getEnvVar(var): # Update Domain readDomain(domain_path) cd('/') -if production_mode_enabled == "true": - cmo.setProductionModeEnabled(true) -else: - cmo.setProductionModeEnabled(false) +setOption('ServerStartMode',production_mode) updateDomain() closeDomain() print 'Domain Updated' diff --git a/OracleWebLogic/samples/12213-domain/container-scripts/createWLSDomain.sh b/OracleWebLogic/samples/12213-domain/container-scripts/createWLSDomain.sh index e8a9e990ce..0443a707c1 100755 --- a/OracleWebLogic/samples/12213-domain/container-scripts/createWLSDomain.sh +++ b/OracleWebLogic/samples/12213-domain/container-scripts/createWLSDomain.sh @@ -1,8 +1,8 @@ #!/bin/bash # -#Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2014, 2020 Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#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 @@ -27,7 +27,7 @@ trap _term SIGTERM # Set SIGKILL handler trap _kill SIGKILL -export DOMAIN_HOME=$CUSTOM_DOMAIN_ROOT/$CUSTOM_DOMAIN_NAME +export DOMAIN_HOME=$DOMAIN_ROOT/$DOMAIN_NAME echo "Domain Home is: $DOMAIN_HOME" SEC_PROPERTIES_FILE=${PROPERTIES_FILE_DIR}/domain_security.properties @@ -59,7 +59,7 @@ if [ ! -e "${DOMAIN_PROPERTIES_FILE}" ]; then fi #Create the domain the first time -if [ ! -f ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/logs/${CUSTOM_ADMIN_NAME}.log ]; then +if [ ! -f ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then # Create domain wlst.sh -skipWLSModuleScanning -loadProperties ${DOMAIN_PROPERTIES_FILE} -loadProperties ${SEC_PROPERTIES_FILE} /u01/oracle/container-scripts/create-wls-domain.py retval=$? @@ -73,13 +73,13 @@ if [ ! -f ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/logs/${CUSTOM_ADMIN_NAME}. fi # Create the security file to start the server(s) without the password prompt - mkdir -p ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/security/ - echo "username=${USER}" >> ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/security/boot.properties - echo "password=${PASS}" >> ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/security/boot.properties + mkdir -p ${DOMAIN_HOME}/servers/${ADMIN_NAME}/security/ + echo "username=${USER}" >> ${DOMAIN_HOME}/servers/${ADMIN_NAME}/security/boot.properties + echo "password=${PASS}" >> ${DOMAIN_HOME}/servers/${ADMIN_NAME}/security/boot.properties fi #Set Java options -export JAVA_OPTIONS=${CUSTOM_JAVA_OPTIONS} +export JAVA_OPTIONS=${JAVA_OPTIONS} echo "Java Options: ${JAVA_OPTIONS}" ${DOMAIN_HOME}/bin/setDomainEnv.sh @@ -89,8 +89,8 @@ echo "==========================" # Start Admin Server and tail the logs ${DOMAIN_HOME}/startWebLogic.sh -touch ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/logs/${CUSTOM_ADMIN_NAME}.log -tail -f ${DOMAIN_HOME}/servers/${CUSTOM_ADMIN_NAME}/logs/${CUSTOM_ADMIN_NAME}.log & +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/samples/12213-domain/container-scripts/get_healthcheck_url.sh b/OracleWebLogic/samples/12213-domain/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..04d616bd60 --- /dev/null +++ b/OracleWebLogic/samples/12213-domain/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,14 @@ +#!/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 [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then + echo "http://{localhost:$MANAGED_SERVER_PORT}/weblogic/ready" ; +elif [ "$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/samples/12213-domain/container-scripts/setEnv.sh b/OracleWebLogic/samples/12213-domain/container-scripts/setEnv.sh index 7c2241d8f6..06288b6155 100755 --- a/OracleWebLogic/samples/12213-domain/container-scripts/setEnv.sh +++ b/OracleWebLogic/samples/12213-domain/container-scripts/setEnv.sh @@ -1,8 +1,8 @@ #!/bin/bash # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. ENV_ARG='' if [ "$#" -eq "0" ] @@ -17,7 +17,7 @@ if [ "$#" -eq "0" ] extract_env() { env_value=`awk '{print $1}' $2 | grep ^$1= | cut -d "=" -f2` if [ -n "$env_value" ]; then - env_arg=`echo "CUSTOM_$1=$env_value"` + env_arg=`echo "$1=$env_value"` echo " env_arg: $env_arg" export $env_arg fi @@ -30,6 +30,7 @@ set_env_arg(){ fi } + # Set DOMAIN_NAME set_env_arg DOMAIN_NAME ${PROPERTIES_FILE} @@ -37,13 +38,13 @@ set_env_arg DOMAIN_NAME ${PROPERTIES_FILE} set_env_arg ADMIN_NAME ${PROPERTIES_FILE} # Set ADMIN_PORT -set_env_arg ADMIN_PORT ${PROPERTIES_FILE} +set_env_arg ADMIN_LISTEN_PORT ${PROPERTIES_FILE} # Set ADMIN_HOST set_env_arg ADMIN_HOST ${PROPERTIES_FILE} -# Set ADMIN_LISTEN_PORT -set_env_arg ADMIN_LISTEN_PORT ${PROPERTIES_FILE} +# Set ADMINISTRATION_PORT_ENABLED +set_env_arg ADMINISTRATION_PORT_ENABLED ${PROPERTIES_FILE} # Set MANAGED_SERVER_PORT set_env_arg MANAGED_SERVER_PORT ${PROPERTIES_FILE} @@ -60,8 +61,8 @@ set_env_arg CLUSTER_NAME ${PROPERTIES_FILE} # Set CLUSTER_TYPE set_env_arg CLUSTER_TYPE ${PROPERTIES_FILE} -# Set PRODUCTION_MODE_ENABLED -set_env_arg PRODUCTION_MODE_ENABLED ${PROPERTIES_FILE} +# Set PRODUCTION_MODE +set_env_arg PRODUCTION_MODE ${PROPERTIES_FILE} # Set DOMAIN_HOST_VOLUME extract_env DOMAIN_HOST_VOLUME ${PROPERTIES_FILE} diff --git a/OracleWebLogic/samples/12213-domain/container-scripts/startManagedServer.sh b/OracleWebLogic/samples/12213-domain/container-scripts/startManagedServer.sh index 5d0e7bbef5..cc58c55145 100644 --- a/OracleWebLogic/samples/12213-domain/container-scripts/startManagedServer.sh +++ b/OracleWebLogic/samples/12213-domain/container-scripts/startManagedServer.sh @@ -1,20 +1,20 @@ #!/bin/bash # -# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # -export DOMAIN_HOME=$CUSTOM_DOMAIN_ROOT/$CUSTOM_DOMAIN_NAME +export DOMAIN_HOME=$DOMAIN_ROOT/$DOMAIN_NAME echo "Domain Home is: $DOMAIN_HOME" -export MS_HOME="${DOMAIN_HOME}/servers/${CUSTOM_MANAGED_NAME}" +export MS_HOME="${DOMAIN_HOME}/servers/${MANAGED_NAME}" export MS_SECURITY="${MS_HOME}/security" # Wait for AdminServer to become available for any subsequent operation /u01/oracle/container-scripts/waitForAdminServer.sh -echo "Managed Server Name: ${CUSTOM_MANAGED_NAME}" +echo "Managed Server Name: ${MANAGED_NAME}" echo "Managed Server Home: ${MS_HOME}" echo "Managed Server Security: ${MS_SECURITY}" @@ -51,16 +51,17 @@ fi #Set Java options #JAVA_OPTIONS="-Dweblogic.StdoutDebugEnabled=false" -export JAVA_OPTIONS=${CUSTOM_JAVA_OPTIONS} +export JAVA_OPTIONS=${JAVA_OPTIONS} echo "Java Options: ${JAVA_OPTIONS}" ${DOMAIN_HOME}/bin/setDomainEnv.sh -echo "Connecting to Admin Server at http://${CUSTOM_ADMIN_HOST}:${CUSTOM_ADMIN_PORT}" -${DOMAIN_HOME}/bin/startManagedWebLogic.sh ${CUSTOM_MANAGED_NAME} "http://${CUSTOM_ADMIN_HOST}:${CUSTOM_ADMIN_PORT}" +echo "Connecting to Admin Server at http://${ADMIN_HOST}:${ADMIN_LISTEN_PORT}" +${DOMAIN_HOME}/bin/startManagedWebLogic.sh ${MANAGED_NAME} "http://${ADMIN_HOST}:${ADMIN_LISTEN_PORT}" # tail Managed Server log -tail -f ${MS_HOME}/logs/${CUSTOM_MANAGED_NAME}.log & +touch ${MS_HOME}/logs/${MANAGED_NAME}.log +tail -f ${MS_HOME}/logs/${MANAGED_NAME}.log & childPID=$! wait $childPID diff --git a/OracleWebLogic/samples/12213-domain/container-scripts/waitForAdminServer.sh b/OracleWebLogic/samples/12213-domain/container-scripts/waitForAdminServer.sh index de6ae74356..55c1f33851 100755 --- a/OracleWebLogic/samples/12213-domain/container-scripts/waitForAdminServer.sh +++ b/OracleWebLogic/samples/12213-domain/container-scripts/waitForAdminServer.sh @@ -1,13 +1,13 @@ #!/bin/bash # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # This script will wait until Admin Server is available. # There is no timeout! # -connectString="${CUSTOM_ADMIN_HOST}/${CUSTOM_ADMIN_PORT}" +connectString="${ADMIN_HOST}/${ADMIN_LISTEN_PORT}" echo "Waiting for WebLogic Admin Server on ${connectString} to become available..." while : diff --git a/OracleWebLogic/samples/12213-domain/properties/domain.properties b/OracleWebLogic/samples/12213-domain/properties/domain.properties index 7eb86d6813..b72481959c 100644 --- a/OracleWebLogic/samples/12213-domain/properties/domain.properties +++ b/OracleWebLogic/samples/12213-domain/properties/domain.properties @@ -1,6 +1,12 @@ +# Env properties inherited from base image DOMAIN_NAME=myDomain -ADMIN_PORT=7001 +ADMIN_LISTEN_PORT=7001 ADMIN_NAME=myadmin +PRODUCTION_MODE=dev +DEBUG_FLAG=true +ADMINISTRATION_PORT_ENABLED=false +ADMINISTRATION_PORT=9002 +# Env properties for this image ADMIN_HOST=AdminContainer MANAGED_SERVER_PORT=8001 MANAGED_SERVER_NAME_BASE=MS diff --git a/OracleWebLogic/samples/12213-domain/run_admin_server.sh b/OracleWebLogic/samples/12213-domain/run_admin_server.sh index 8ce04ad554..d22be54a84 100755 --- a/OracleWebLogic/samples/12213-domain/run_admin_server.sh +++ b/OracleWebLogic/samples/12213-domain/run_admin_server.sh @@ -4,7 +4,6 @@ # #Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. - set_context() { scriptDir="$( cd "$( dirname "$0" )" && pwd )" if [ ! -d "${scriptDir}" ]; then @@ -20,7 +19,7 @@ set_context # HOST volume where the domain home will be persisted domain_host_volume() { - domainhostvol=${CUSTOM_DOMAIN_HOST_VOLUME} + domainhostvol=${DOMAIN_HOST_VOLUME} if [ -z "$domainhostvol" ]; then echo "The parameter DOMAIN_HOST_VOLUME must be set in ${scriptDir}/properties/domain.properties." exit @@ -34,14 +33,22 @@ domain_host_volume() { } admin_host() { - adminhost=${CUSTOM_ADMIN_HOST:-"AdminContainer"} + adminhost=${ADMIN_HOST:-"AdminContainer"} } +admin_listen_port() { + adminport=${ADMIN_LISTEN_PORT} +} +administration_port() { + administrationport=${ADMINISTRATION_PORT} +} #echo "ENV_ARG is: ${ENV_ARG}" admin_host +admin_listen_port +administration_port domain_host_volume -echo "docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --hostname ${adminhost} -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} 12213-weblogic-domain-in-volume" +echo "docker run -d -p 9001:${adminport} -p 9002:${administrationport} --name ${adminhost} --hostname ${adminhost} -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} 12213-weblogic-domain-in-volume" -docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --hostname ${adminhost} -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} 12213-weblogic-domain-in-volume +docker run -d -p 9001:${adminport} -p 9002:${administrationport} --name ${adminhost} --hostname ${adminhost} -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} 12213-weblogic-domain-in-volume diff --git a/OracleWebLogic/samples/12213-domain/run_managed_server.sh b/OracleWebLogic/samples/12213-domain/run_managed_server.sh index 21957f9182..47787e53fb 100755 --- a/OracleWebLogic/samples/12213-domain/run_managed_server.sh +++ b/OracleWebLogic/samples/12213-domain/run_managed_server.sh @@ -1,8 +1,8 @@ #! /bin/bash # -#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2019, 2020, Oracle and/or its affiliates. # -#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # Pass in the managed server name to run and the mapped port if [ "$#" -eq "0" ] @@ -32,7 +32,7 @@ set_context echo "Admin Host is: ${adminhost}" admin_host() { - adminhost=${CUSTOM_ADMIN_HOST:-"AdminContainer"} + adminhost=${ADMIN_HOST:-"AdminContainer"} } managed_name() { @@ -47,11 +47,11 @@ managed_name() { maped_port() { if [ -z "$mapedport" ]; then - echo "You must pass in the docker port that will be mapped to the managed server port $CUSTOM_MANAGED_SERVER_PORT" + echo "You must pass in the docker port that will be mapped to the managed server port $MANAGED_SERVER_PORT" exit else export mapedport=$mapedport - echo "docker port $mapedport will be mapped to managed server port $CUSTOM_MANAGED_SERVER_PORT" + echo "docker port $mapedport will be mapped to managed server port $MANAGED_SERVER_PORT" fi } @@ -59,8 +59,8 @@ admin_host managed_name maped_port echo "Admin Host is: ${adminhost}" -ENV_ARG="${ENV_ARG} -e CUSTOM_MANAGED_NAME=$managedname" +ENV_ARG="${ENV_ARG} -e MANAGED_NAME=$managedname -e MANAGED_SERVER_CONTAINER=true" -echo "docker run -d -p ${mapedport}:${CUSTOM_MANAGED_SERVER_PORT} -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --link ${adminhost}:${adminhost} --name ${managedname} 12213-weblogic-domain-in-volume /u01/oracle/container-scripts/startManagedServer.sh" +echo "docker run -d -p ${mapedport}:${MANAGED_SERVER_PORT} -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --link ${adminhost}:${adminhost} --name ${managedname} 12213-weblogic-domain-in-volume /u01/oracle/container-scripts/startManagedServer.sh" -docker run -d -p ${mapedport}:${CUSTOM_MANAGED_SERVER_PORT} -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --link ${adminhost}:${adminhost} --name ${managedname} 12213-weblogic-domain-in-volume /u01/oracle/container-scripts/startManagedServer.sh +docker run -d -p ${mapedport}:${MANAGED_SERVER_PORT} -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --link ${adminhost}:${adminhost} --name ${managedname} 12213-weblogic-domain-in-volume /u01/oracle/container-scripts/startManagedServer.sh