Wednesday, December 13, 2023

Push Docker image to Google cloud (GCP) container registry

 HOWTO

See also


Authenticate against GCP via gcloud shell


dave@dave:~$ docker push gcr.io/dave-terraform/oraclelinux:7-slim
ERROR: (gcloud.auth.docker-helper) There was a problem refreshing your current auth tokens: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account, run:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
The push refers to repository [gcr.io/dave-terraform/oraclelinux]
An image does not exist locally with the tag: gcr.io/dave-terraform/oraclelinux
dave@dave:~$ gcloud auth login
Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?....

You are now logged in as [daniel.veselka@gmail.com].
Your current project is [dave-terraform].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID

Configure Docker in GCP
$ gcloud auth configure-docker
Adding credentials for all GCR repositories.
WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using.
After update, the following will be written to your Docker config file located at [/home/dave/.docker/config.json]:
 {
  "credHelpers": {
    "gcr.io": "gcloud",
    "us.gcr.io": "gcloud",
    "eu.gcr.io": "gcloud",
    "asia.gcr.io": "gcloud",
    "staging-k8s.gcr.io": "gcloud",
    "marketplace.gcr.io": "gcloud"
  }
}

Do you want to continue (Y/n)?  Y

Docker configuration file updated.


Full list of Artifact registry 

$ gcloud auth configure-docker
WARNING: Your config file at [/home/student_03_ca7dee6f1b2a/.docker/config.json] contains these credential helper entries:

{
  "credHelpers": {
    "asia-docker.pkg.dev": "gcloud",
    "asia-east1-docker.pkg.dev": "gcloud",
    "asia-east2-docker.pkg.dev": "gcloud",
    "asia-northeast1-docker.pkg.dev": "gcloud",
    "asia-northeast2-docker.pkg.dev": "gcloud",
    "asia-northeast3-docker.pkg.dev": "gcloud",
    "asia-south1-docker.pkg.dev": "gcloud",
    "asia-south2-docker.pkg.dev": "gcloud",
    "asia-southeast1-docker.pkg.dev": "gcloud",
    "asia-southeast2-docker.pkg.dev": "gcloud",
    "australia-southeast1-docker.pkg.dev": "gcloud",
    "australia-southeast2-docker.pkg.dev": "gcloud",
    "europe-docker.pkg.dev": "gcloud",
    "europe-central2-docker.pkg.dev": "gcloud",
    "europe-north1-docker.pkg.dev": "gcloud",
    "europe-southwest1-docker.pkg.dev": "gcloud",
    "europe-west1-docker.pkg.dev": "gcloud",
    "europe-west10-docker.pkg.dev": "gcloud",
    "europe-west12-docker.pkg.dev": "gcloud",
    "europe-west2-docker.pkg.dev": "gcloud",
    "europe-west3-docker.pkg.dev": "gcloud",
    "europe-west4-docker.pkg.dev": "gcloud",
    "europe-west6-docker.pkg.dev": "gcloud",
    "europe-west8-docker.pkg.dev": "gcloud",
    "europe-west9-docker.pkg.dev": "gcloud",
    "me-central1-docker.pkg.dev": "gcloud",
    "me-central2-docker.pkg.dev": "gcloud",
    "me-west1-docker.pkg.dev": "gcloud",
    "northamerica-northeast1-docker.pkg.dev": "gcloud",
    "northamerica-northeast2-docker.pkg.dev": "gcloud",
    "southamerica-east1-docker.pkg.dev": "gcloud",
    "us-docker.pkg.dev": "gcloud",
    "us-central1-docker.pkg.dev": "gcloud",
    "us-east1-docker.pkg.dev": "gcloud",
    "us-east4-docker.pkg.dev": "gcloud",
    "us-east5-docker.pkg.dev": "gcloud",
    "us-east7-docker.pkg.dev": "gcloud",
    "us-south1-docker.pkg.dev": "gcloud",
    "us-west1-docker.pkg.dev": "gcloud",
    "us-west2-docker.pkg.dev": "gcloud",
    "us-west3-docker.pkg.dev": "gcloud",
    "us-west4-docker.pkg.dev": "gcloud"
  }
}

List my own registry

$ gcloud artifacts repositories list
Listing items under project dave-terraform, across all locations.

                                                               ARTIFACT_REGISTRY
REPOSITORY   FORMAT  MODE                 DESCRIPTION  LOCATION  LABELS  ENCRYPTION          CREATE_TIME          UPDATE_TIME          SIZE (MB)
asia.gcr.io  DOCKER  STANDARD_REPOSITORY               asia              Google-managed key  2023-12-13T10:15:02  2023-12-13T10:15:02  0
eu.gcr.io    DOCKER  STANDARD_REPOSITORY               europe            Google-managed key  2023-12-13T10:14:54  2023-12-13T11:58:44  847.519
gcr.io       DOCKER  STANDARD_REPOSITORY               us                Google-managed key  2023-12-13T10:14:53  2023-12-13T10:14:53  0
us.gcr.io    DOCKER  STANDARD_REPOSITORY               us                Google-managed key  2023-12-13T10:14:52  2023-12-13T10:14:52  0


Tag the Docker image with GCP registry host
~$ docker push gcr.io/dave-terraform/oraclelinux:7-slim
The push refers to repository [gcr.io/dave-terraform/oraclelinux]
An image does not exist locally with the tag: gcr.io/dave-terraform/oraclelinux
dave@dave:~$ docker tag 138MB gcr.io/dave-terraform/oraclelinux:7-slim
Error parsing reference: "138MB" is not a valid repository/tag: invalid reference format: repository name must be lowercase
dave@dave:~$ docker tag 506c06ed74d4 gcr.io/dave-terraform/oraclelinux:7-slim
dave@dave:~$ docker push gcr.io/dave-terraform/oraclelinux:7-slim
The push refers to repository [gcr.io/dave-terraform/oraclelinux]

Push the Docker image to GCP container registry
$ docker push eu.gcr.io/dave-terraform/oraclelinux:7-slim
The push refers to repository [eu.gcr.io/dave-terraform/oraclelinux]
2a900b79adf5: Layer already exists 
7-slim: digest: sha256:b477523e90e66d9944bb0ce9c08246c431b617bfc5997bbaa1842d009bf561bb size: 529
dave@dave:~$ docker images
REPOSITORY                             TAG                   IMAGE ID       CREATED         SIZE
1411-weblogic-domain-in-volume         latest                e15b6085f27d   2 days ago      1.27GB
oracle/weblogic                        14.1.1.0-generic-11   a63e1c89480e   2 days ago      1.27GB
<none>                                 <none>                a6efff1e460a   2 days ago      1.91GB
<none>                                 <none>                74fc89d6f899   2 days ago      1.91GB
oracle/jdk                             11-ol7                fea3c351284b   2 days ago      451MB
<none>                                 <none>                dcacebd8006e   2 days ago      1.14GB
gcr.io/dave-terraform/oraclelinux      7-slim                506c06ed74d4   4 weeks ago     138MB
oraclelinux                            7-slim                506c06ed74d4   4 weeks ago     138MB
eu.gcr.io/dave-terraform/oraclelinux   7-slim                506c06ed74d4   4 weeks ago     138MB

Check deployed Docker images in registry via GCP console

Check deployed images via gcloud



$ gcloud container images list --repository=eu.gcr.io/dave-terraform
NAME
eu.gcr.io/dave-terraform/1411-weblogic-domain-in-volume
eu.gcr.io/dave-terraform/oracle
eu.gcr.io/dave-terraform/oraclelinux

GCP Artifact registry

Show pull command




docker pull \
    eu.gcr.io/dave-terraform/1411-weblogic-domain-in-volume:latest

Sunday, December 10, 2023

Create Weblogic 14.1.1 domain from Docker image

 

Oracle HOWTO


See also


GitHub 



Oracle HOWTO


Oracle WebLogic domain in volume on Docker

This project creates a Docker image which contains an Oracle WebLogic domain image. The image extends the WebLogic install image and builds an WebLogic domain persisted to a host volume.

How to build and run

This project offers a sample Dockerfile and scripts to build an Oracle WebLogic 12.2.1.3 domain in volume.

Building the Oracle WebLogic 14.1.1 developer install image

See https://danielveselka.blogspot.com/2023/12/create-weblogic-1411-docker-image.html

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.

The format of the domain_security.properties file is key=value pair:

    username=myadminusername
    password=myadminpassword

Note: Oracle recommends that the domain_securtity.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.

Build the WebLogic Domain Image

  1. To build the 14.1.1 WebLogic domain image, run:

    $ docker build -f Dockerfile -t 1411-weblogic-domain-in-volume .

  2. Verify you now have this image in place with:

`$ docker images`

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 in the ./properties/domain.properties file. The script ./container-scripts/setEnv.sh sets the environment variables to configure the domain. The properties set as environment variables are:

  * `DOMAIN_NAME`
  * `ADMIN_PORT`
  * `ADMIN_NAME`
  * `ADMIN_HOST`
  * `MANAGED_SERVER_PORT`
  * `MANAGED_SERVER_NAME_BASE`
  * `MANAGED_SERVER_CONTAINER`
  * `CONFIGURED_MANAGED_SERVER_COUNT`
  * `CLUSTER_NAME`
  * `CLUSTER_TYPE`
  * `PRODUCTION_MODE_ENABLED`
  * `DOMAIN_HOST_VOLUME`

NOTE: When you set the DOMAIN_NAME, the DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME.

IMPORTANT: The domain directory needs to be externalized by using data volumes (-v option). The Administration Server as well as the Managed Servers need to read/write to the same DOMAIN_HOME.

We are supplying scripts run_admin_server.sh and run_managed_server.sh to facilitate setting the environment variables defined in the property files and running the admin server and managed server containers.

Start a container to launch the Administration and Managed Servers from the image created in step 1.

To run an Administration Server container, call:

    `$ sh run_admin_server.sh`

To run Managed Server with base name MS pass in to the scrtipt run_managed_server.sh the name of the managed server you want to run and the host port that will be mapped to the managed server port defined in MANAGED_SERVER_PORT.

To run managed server one with name MS1 and mapped to host port 98001 call:

    `$ sh run_managed_server.sh MS1 98001`

To run managed server two with name MS2 and mapped to host port 98002 call:

    `$ sh run_managed_server.sh MS2 98002`

Access the Administration Console:

`$ docker inspect --format '{{.NetworkSettings.IPAddress}}' <container-name>`
    This returns the IP address of the container (for example, `xxx.xx.x.x`).  Go to your browser and enter `http://xxx.xx.x.x:9001/console`

    Because the container ports are mapped to the host port, you can access it using the `hostname` as well.


Create Weblogic 14.1.1 domain 


Files for domain 

dave@dave:/git/weblogic/docker-domain$ find
.
./build.sh
./container-scripts
./container-scripts/add-machine.py
./container-scripts/add-server.py
./container-scripts/commEnv.sh
./container-scripts/commonfuncs.py
./container-scripts/create-wls-domain.py
./container-scripts/createMachine.sh
./container-scripts/createServer.sh
./container-scripts/jaxrs2-template.jar
./container-scripts/waitForAdminServer.sh
./container-scripts/wlst
./container-scripts/createWLSDomain.sh
./container-scripts/get_healthcheck_url.sh
./container-scripts/setEnv.sh
./container-scripts/startManagedServer.sh
./README.md
./Dockerfile
./properties
./properties/domain.properties
./properties/domain_security.properties
./run_admin_server.sh
./run_managed_server.sh

Docker images
dave@dave:/git/weblogic/docker-domain$ docker images
REPOSITORY                            TAG                   IMAGE ID       CREATED             SIZE
oracle/weblogic                       14.1.1.0-generic-11   a63e1c89480e   About an hour ago   1.27GB
<none>                                <none>                a6efff1e460a   About an hour ago   1.91GB
<none>                                <none>                74fc89d6f899   About an hour ago   1.91GB
oracle/jdk                            11-ol7                fea3c351284b   2 hours ago         451MB
<none>                                <none>                dcacebd8006e   2 hours ago         1.14GB
oraclelinux                           7-slim                506c06ed74d4   3 weeks ago         138MB

Modify persistent volume location
$ git diff properties/domain.properties
diff --git a/docker-domain/properties/domain.properties b/docker-domain/properties/domain.properties
index b724819..9bc89ac 100644
--- a/docker-domain/properties/domain.properties
+++ b/docker-domain/properties/domain.properties
@@ -14,4 +14,4 @@ CONFIGURED_MANAGED_SERVER_COUNT=2
 PRODUCTION_MODE_ENABLED=true
 CLUSTER_NAME=cluster1
 CLUSTER_TYPE=DYNAMIC
-DOMAIN_HOST_VOLUME=/Users/host/temp
+DOMAIN_HOST_VOLUME=/app/domains

Check rights on volume
$ ls -ld /app/domains/
drwxr-x---. 1 dave dave 56 Jan 30  2022 /app/domains/
dave@dave:/git/weblogic/docker-domain$ chmod 777 /app/domains/

Set admin password in property file
$ cat properties/domain_security.properties
username=weblogic
password=weblgoic123

Build domain using build.sh
ave@dave:/git/weblogic/docker-domain$ ./build.sh 
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  51.71kB
Step 1/11 : FROM oracle/weblogic:14.1.1.0-generic-11
 ---> a63e1c89480e
Step 2/11 : LABEL "provider"="Oracle"                                                     "maintainer"="Monica Riccelli <monica.riccelli@oracle.com>"             "issues"="https://github.com/oracle/docker-images/issues"               "port.admin.listen"="7001"                                              "port.administration"="9002"                                            "port.managed.server"="8001"
 ---> Running in 2345b2a74011
Removing intermediate container 2345b2a74011
 ---> 4f21d8454d46
Step 3/11 : 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"     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"
 ---> Running in 90617a796664
Removing intermediate container 90617a796664
 ---> c39b5ed96dca
Step 4/11 : COPY --chown=oracle:oracle container-scripts/* /u01/oracle/container-scripts/
 ---> ad4c257e596d
Step 5/11 : COPY --chown=oracle:oracle container-scripts/get_healthcheck_url.sh /u01/oracle/get_healthcheck_url.sh
 ---> 73cbaf7ecff6
Step 6/11 : USER root
 ---> Running in b3bba43de1c5
Removing intermediate container b3bba43de1c5
 ---> 59fb28b0c1e3
Step 7/11 : 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/*
 ---> Running in 9e64451b2a54
Removing intermediate container 9e64451b2a54
 ---> 844c4f0c18df
Step 8/11 : VOLUME $DOMAIN_ROOT
 ---> Running in bbf7e165f354
Removing intermediate container bbf7e165f354
 ---> 30cb6a7527ae
Step 9/11 : USER oracle
 ---> Running in e3ca1b9a1461
Removing intermediate container e3ca1b9a1461
 ---> 4f3e5330c095
Step 10/11 : WORKDIR $ORACLE_HOME
 ---> Running in 3f5764b70b89
Removing intermediate container 3f5764b70b89
 ---> 70def36c3473
Step 11/11 : CMD ["/u01/oracle/container-scripts/createWLSDomain.sh"]
 ---> Running in a45dd0809491
Removing intermediate container a45dd0809491
 ---> e15b6085f27d
Successfully built e15b6085f27d
Successfully tagged 1411-weblogic-domain-in-volume:latest

List images
dave@dave:/git/weblogic/docker-domain$ docker images
REPOSITORY                            TAG                   IMAGE ID       CREATED             SIZE
1411-weblogic-domain-in-volume        latest                e15b6085f27d   27 seconds ago      1.27GB
oracle/weblogic                       14.1.1.0-generic-11   a63e1c89480e   About an hour ago   1.27GB
<none>                                <none>                a6efff1e460a   About an hour ago   1.91GB
<none>                                <none>                74fc89d6f899   About an hour ago   1.91GB
oracle/jdk                            11-ol7                fea3c351284b   2 hours ago         451MB
<none>                                <none>                dcacebd8006e   2 hours ago         1.14GB
oraclelinux                           7-slim                506c06ed74d4   3 weeks ago         138MB

Run admin server
 ./run_admin_server.sh 
Context for docker build is /git/weblogic/docker-domain
Export environment variables from the /git/weblogic/docker-domain/properties/domain.properties properties file
 env_arg: DOMAIN_NAME=myDomain
 env_arg: ADMIN_NAME=myadmin
 env_arg: ADMIN_LISTEN_PORT=7001
 env_arg: ADMIN_HOST=AdminContainer
 env_arg: ADMINISTRATION_PORT_ENABLED=false
 env_arg: MANAGED_SERVER_PORT=8001
 env_arg: MANAGED_SERVER_NAME_BASE=MS
 env_arg: CONFIGURED_MANAGED_SERVER_COUNT=2
 env_arg: CLUSTER_NAME=cluster1
 env_arg: CLUSTER_TYPE=DYNAMIC
 env_arg: PRODUCTION_MODE=dev
 env_arg: DOMAIN_HOST_VOLUME=/app/domains
The domain configuration will get persisted in the host volume: /app/domains
docker run -d -p 9001:7001 --name AdminContainer --hostname AdminContainer -v /git/weblogic/docker-domain/properties:/u01/oracle/properties -v /app/domains:/u01/oracle/user_projects/domains  -e DOMAIN_NAME=myDomain -e ADMIN_NAME=myadmin -e ADMIN_LISTEN_PORT=7001 -e ADMIN_HOST=AdminContainer -e ADMINISTRATION_PORT_ENABLED=false -e MANAGED_SERVER_PORT=8001 -e MANAGED_SERVER_NAME_BASE=MS -e CONFIGURED_MANAGED_SERVER_COUNT=2 -e CLUSTER_NAME=cluster1 -e CLUSTER_TYPE=DYNAMIC -e PRODUCTION_MODE=dev 1411-weblogic-domain-in-volume
813697a094067b8fbfe02deda03d56d0de67405fecbff42e49a010eee6e9ecbd

Missing property file
$ docker ps -a
CONTAINER ID   IMAGE                            COMMAND                  CREATED          STATUS                      PORTS     NAMES
813697a09406   1411-weblogic-domain-in-volume   "/u01/oracle/contain…"   26 seconds ago   Exited (0) 25 seconds ago             AdminContainer
4ba36c6d2ccb   oracle/jdk:11-ol7                "jshell"                 2 hours ago      Exited (0) 2 hours ago                interesting_fermat
dave@dave:/git/weblogic/docker-domain$ docker logs AdminContainer
Domain Home is:  /u01/oracle/user_projects/domains/myDomain
/u01/oracle/properties/domain_security.properties
A properties file with the username and password needs to be supplied.
Copy property file and admin server access file to properties dir
dave@dave:/git/weblogic/docker-domain$ find /app/domains/properties/
/app/domains/properties/
/app/domains/properties/domain_security.properties
/app/domains/properties/domain.properties
dave@dave:/git/weblogic/docker-domain$ ./run_admin_server.sh 
Context for docker build is /git/weblogic/docker-domain
Export environment variables from the /git/weblogic/docker-domain/properties/domain.properties properties file
 env_arg: DOMAIN_NAME=myDomain
 env_arg: ADMIN_NAME=myadmin
 env_arg: ADMIN_LISTEN_PORT=7001
 env_arg: ADMIN_HOST=AdminContainer
 env_arg: ADMINISTRATION_PORT_ENABLED=false
 env_arg: MANAGED_SERVER_PORT=8001
 env_arg: MANAGED_SERVER_NAME_BASE=MS
 env_arg: CONFIGURED_MANAGED_SERVER_COUNT=2
 env_arg: CLUSTER_NAME=cluster1
 env_arg: CLUSTER_TYPE=DYNAMIC
 env_arg: PRODUCTION_MODE=dev
 env_arg: DOMAIN_HOST_VOLUME=/app/domains
The domain configuration will get persisted in the host volume: /app/domains
docker run -d -p 9001:7001 --name AdminContainer --hostname AdminContainer -v /app/domains/properties:/u01/oracle/properties -v /app/domains:/u01/oracle/user_projects/domains  -e DOMAIN_NAME=myDomain -e ADMIN_NAME=myadmin -e ADMIN_LISTEN_PORT=7001 -e ADMIN_HOST=AdminContainer -e ADMINISTRATION_PORT_ENABLED=false -e MANAGED_SERVER_PORT=8001 -e MANAGED_SERVER_NAME_BASE=MS -e CONFIGURED_MANAGED_SERVER_COUNT=2 -e CLUSTER_NAME=cluster1 -e CLUSTER_TYPE=DYNAMIC -e PRODUCTION_MODE=dev 1411-weblogic-domain-in-volume
80c609a25b9d4ff4e49a0d48c929dad91da919b408b48d3dc8bcaaaf823b736f
dave@dave:/git/weblogic/docker-domain$ docker logs AdminContainer
Domain Home is:  /u01/oracle/user_projects/domains/myDomain
/u01/oracle/properties/domain_security.properties
/u01/oracle/properties/domain.properties

Initializing WebLogic Scripting Tool (WLST) ...

Missing permissions on host volume
 docker logs AdminContainer
Domain Home is:  /u01/oracle/user_projects/domains/myDomain
/u01/oracle/properties/domain_security.properties
/u01/oracle/properties/domain.properties

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

domain_path              : [/u01/oracle/user_projects/domains/myDomain]
domain_name              : [myDomain]
admin_server_name        : [myadmin]
admin_port               : [7001]
cluster_name             : [cluster1]
server_port              : [8001]
number_of_ms             : [2]
cluster_type             : [DYNAMIC]
managed_server_name_base : [MS]
production_mode          : [dev]
Configuring Dynamic Cluster cluster1
Creating Server Template: cluster1-template
Done creating Server Template: cluster1-template
Done setting attributes for Dynamic Cluster: cluster1
com.oracle.cie.domain.script.ScriptException: 60308: Domain location not writable.
60308: The domain location does not have write permission.
60308: Correct permissions or select different domain location.

    at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:2048)
    at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1880)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.oracle.cie.domain.script.jython.WLSTState.processCommand(WLSTState.java:226)
    at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:732)
    at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)
    at org.python.core.PyObject.__call__(PyObject.java:515)
    at org.python.core.PyObject.__call__(PyObject.java:519)
    at org.python.core.PyMethod.__call__(PyMethod.java:156)
    at org.python.pycode._pyx6.command$1(/tmp/WLSTOfflineIni5927803169066468041.py:19)
    at org.python.pycode._pyx6.call_function(/tmp/WLSTOfflineIni5927803169066468041.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:146)
    at org.python.core.PyFunction.__call__(PyFunction.java:423)
    at org.python.pycode._pyx6.writeDomain$29(/tmp/WLSTOfflineIni5927803169066468041.py:114)
    at org.python.pycode._pyx6.call_function(/tmp/WLSTOfflineIni5927803169066468041.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
    at org.python.core.PyFunction.__call__(PyFunction.java:413)
    at org.python.pycode._pyx32.f$0(/u01/oracle/container-scripts/create-wls-domain.py:136)
    at org.python.pycode._pyx32.call_function(/u01/oracle/container-scripts/create-wls-domain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1614)
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:296)
    at weblogic.management.scripting.WLST.main(WLST.java:192)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at weblogic.WLST.main(WLST.java:47)
Error: runCmd() failed. Do dumpStack() to see details.
Traceback (most recent call last):
  File "/u01/oracle/container-scripts/create-wls-domain.py", line 121, in <module>
    writeDomain(domain_path)
  File "/tmp/WLSTOfflineIni5927803169066468041.py", line 113, in writeDomain
    command("writeDomain", domainDir)
  File "/tmp/WLSTOfflineIni5927803169066468041.py", line 19, in command
    return WLS.runCmd(name, args)
60308: Domain location not writable.
60308: The domain location does not have write permission.
60308: Correct permissions or select different domain location.

    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:3124)
    at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:738)
    at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: Error writing domain:
60308: Domain location not writable.
60308: The domain location does not have write permission.
60308: Correct permissions or select different domain location.

Problem invoking WLST - Traceback (most recent call last):
  File "/u01/oracle/container-scripts/create-wls-domain.py", line 121, in <module>
    writeDomain(domain_path)
  File "/tmp/WLSTOfflineIni5927803169066468041.py", line 113, in writeDomain
    command("writeDomain", domainDir)
  File "/tmp/WLSTOfflineIni5927803169066468041.py", line 19, in command
    return WLS.runCmd(name, args)
60308: Domain location not writable.
60308: The domain location does not have write permission.
60308: Correct permissions or select different domain location.

    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:3124)
    at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:738)
    at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: Error writing domain:
60308: Domain location not writable.
60308: The domain location does not have write permission.
60308: Correct permissions or select different domain location.


RetVal from Domain creation 1
Domain Creation Failed.. Please check the Domain Logs

Add :z to mounted host volume
Exiting WebLogic Scripting Tool.

RetVal from Domain creation 0
Java Options: -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false
Starting the Admin Server
==========================
.
.
JAVA Memory arguments: -Djava.security.egd=file:/dev/./urandom
.
CLASSPATH=/usr/java/jdk-11/lib/tools.jar:/u01/oracle/wlserver/server/lib/weblogic.jar:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/u01/oracle/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/u01/oracle/wlserver/common/derby/lib/derbynet.jar:/u01/oracle/wlserver/common/derby/lib/derbyclient.jar:/u01/oracle/wlserver/common/derby/lib/derby.jar
.
PATH=/u01/oracle/user_projects/domains/myDomain/bin:/u01/oracle/wlserver/server/bin:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk-11/bin:/usr/java/jdk-11/bin:/usr/java/jdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/jdk-11/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/usr/java/jdk-11/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/container-scripts
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
Starting WLS with line:
/usr/java/jdk-11/bin/java -server   -Djava.security.egd=file:/dev/./urandom -cp /u01/oracle/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=myadmin -Djava.security.policy=/u01/oracle/wlserver/server/lib/weblogic.policy -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader  -javaagent:/u01/oracle/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/u01/oracle/wlserver/server -Dweblogic.home=/u01/oracle/wlserver/server      weblogic.Server
Java HotSpot(TM) 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.oracle.classloader.weblogic.LaunchClassLoader"). To use archived non-system classes, this property must be not be set
<Dec 10, 2023, 2:44:20 PM Greenwich Mean Time> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> 
<Dec 10, 2023, 2:44:20 PM Greenwich Mean Time> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> 

Start line with added :z - modify in run_admin_server.sh
docker run -d -p 9001:${adminport} --name ${adminhost} --hostname ${adminhost} -v /app/domains/properties:/u01/oracle/properties:z -v ${domainhostvol}:/u01/oracle/user_projects/domains:z ${ENV_ARG} 1411-weblogic-domain-in-volume

Admin server container running
dave@dave:/git/weblogic/docker-domain$ docker ps
CONTAINER ID   IMAGE                            COMMAND                  CREATED              STATUS                        PORTS                                       NAMES
5fae4bf178dd   1411-weblogic-domain-in-volume   "/u01/oracle/contain…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:9001->7001/tcp, :::9001->7001/tcp   AdminContainer

Check Admin console on port 9001 - http://dave:9001/console

Create Weblogic 14.1.1 Docker image

 Installation package

GitHub

See also






dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ ls -lt
total 165964
-rw-r--r--. 1 dave dave      2718 Dec 10 13:25 Dockerfile
-rw-r--r--. 1 dave dave 169934047 Dec 10 13:22 jdk-11.0.20_linux-x64_bin.tar.gz
-rwxr-xr-x. 1 dave dave       411 Dec 10 13:16 build.sh
-rw-r--r--. 1 dave dave      2662 Dec 10 13:16 Dockerfile.8
dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ docker images
REPOSITORY                            TAG       IMAGE ID       CREATED          SIZE
oracle/jdk                            11-ol7    fea3c351284b   15 minutes ago   451MB
<none>                                <none>    dcacebd8006e   16 minutes ago   1.14GB
oraclelinux                           7-slim    506c06ed74d4   3 weeks ago      138MB


Build Weblogic 14.1.1 image


Docker image Modify Java image tag according to what was built - Java tag is reffered from Oracle Weblogic image 11-ol7

Oracle HOWTO 

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 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 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.

2- The WebLogic `slim` image is supported for `development` and `production` deployment of WebLogic configurations using Docker.  In order to reduce image size, it contains a subset of the binaries included in the WebLogic generic image.   The WebLogic console, WebLogic examples, WebLogic clients, Maven plug-ins and Java DB have been removed - all binaries that remain included are the same as those in the WebLogic generic image.  The WebLogic slim image is primarily intended for WebLogic domains managed with the WebLogic Kubernetes Operator, when WLS console-based monitoring and configuration is not required, and a smaller image size than the generic image is preferred.  If there are requirements to monitor the WebLogic configuration, they should be addressed using Prometheus and Grafana or other alternatives. 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.

3- The WebLogic `developer` image is supported for `development` of  WebLogic applications in Docker containers.  In order to reduce image size, it contains a subset of the binaries included in the WebLogic generic image.   WebLogic examples and WLS Console help files have been removed - all binaries that remain included are the same as those in the WebLogic generic image.  The WebLogic developer image is primarily intended to provide a Docker image that is consistent with the WebLogic "quick installers" intended for `development` only.   Production WebLogic domains should use the WebLogic generic or WebLogic slim images.   


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/<version>`).  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] [-j]
        Builds a Docker Image for Oracle WebLogic Server.

        Parameters:
           -v: version to build. Required.
           Choose : 14.1.1.0
           -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

        * select one distribution only: -d, -g, or -m

        LICENSE UPL 1.0

        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 -j 11`

  2. Verify that you now have this image in place with:

        `$ docker images`
     
     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
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 Server 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 14.1.1.0. If you prefer to not enable the 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:14.1.1.0-developer-11

Run the WLS Administration Console:

        $ docker inspect --format '{{.NetworkSettings.IPAddress}}' <container-name>

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) 2014, 2022, Oracle and/or its affiliates.


Create Oracle Weblogic 14.1.1 image 


dave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ ./buildDockerImage.sh -v 14.1.1.0 -g -j 11 
Set- WebLogic's Version 14.1.1.0
Set- Distribution:Generic
Set- JDK Version 11
Version= 14.1.1.0 Distribution= generic-11
Checking if required packages are present and valid...
fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip: OK
=====================
Building image 'oracle/weblogic:14.1.1.0-generic-11' ...
Building image using Dockerfile.'generic-11'
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  637.8MB
Step 1/19 : FROM oracle/jdk:11-ol7 as builder
 ---> fea3c351284b
Step 2/19 : LABEL "provider"="Oracle"                                                     "maintainer"="Monica Riccelli <monica.riccelli@oracle.com>"             "issues"="https://github.com/oracle/docker-images/issues"               "port.admin.listen"="7001"                                              "port.administration"="9002"
 ---> Running in 948085d825dd
Removing intermediate container 948085d825dd
 ---> 07adc77f7103
Step 3/19 : 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
 ---> Running in cf3d65b7e8b3
Removing intermediate container cf3d65b7e8b3
 ---> 11205d8e8724
Step 4/19 : RUN mkdir /u01 &&     useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle &&     chown oracle:root -R /u01 &&     chmod -R 775 /u01
 ---> Running in ff64fe64d6a2
Removing intermediate container ff64fe64d6a2
 ---> 4bfdc0bd7458
Step 5/19 : ENV FMW_PKG=fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip     FMW_JAR=fmw_14.1.1.0.0_wls_lite_generic.jar
 ---> Running in 1da04d801cc1
Removing intermediate container 1da04d801cc1
 ---> 49220deea1b1
Step 6/19 : COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/
 ---> 6d2a862fd32b
Step 7/19 : USER oracle
 ---> Running in abfbd86e7d09
Removing intermediate container abfbd86e7d09
 ---> 0e36338dbbf5
Step 8/19 : 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
 ---> Running in 3dae13c551ff
/
Launcher log file is /tmp/OraInstall2023-12-10_01-02-21PM/launcher2023-12-10_01-02-21PM.log.
Extracting the installer . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2603.809 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 8191 MB    Passed
Checking temp space: must be greater than 300 MB.   Actual 97604 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2023-12-10_01-02-21PM
Log: /tmp/OraInstall2023-12-10_01-02-21PM/install2023-12-10_01-02-21PM.log
Setting ORACLE_HOME...
Setting INSTALL_TYPE...
Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Validations are disabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 14.1.1 WebLogic Server and Coherence 14.1.1.0.0 completed successfully.
Logs successfully copied to /u01/oracle/.inventory/logs.
Removing intermediate container 3dae13c551ff
 ---> 74fc89d6f899

Final image build
Step 9/19 : FROM oracle/jdk:11-ol7
 ---> fea3c351284b
Step 10/19 : 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
 ---> Running in 6a4311a468aa
Removing intermediate container 6a4311a468aa
 ---> 05ed16dcb0ff
Step 11/19 : 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}"
 ---> Running in 05c67a838f44
Removing intermediate container 05c67a838f44
 ---> 2dc4c671343f
Step 12/19 : RUN mkdir -p /u01 &&     chmod 775 /u01 &&     useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle &&     chown oracle:root /u01
 ---> Running in b06aae28f0ca
Removing intermediate container b06aae28f0ca
 ---> fd3567fea8fe
Step 13/19 : COPY --from=builder --chown=oracle:root /u01 /u01
 ---> c6a71035b723
Step 14/19 : COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/
 ---> de880dfbaebd
Step 15/19 : RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE &&     chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE
 ---> Running in 23f141d58ca1
Removing intermediate container 23f141d58ca1
 ---> 51861410f4e7
Step 16/19 : USER oracle
 ---> Running in 20c54fc88fef
Removing intermediate container 20c54fc88fef
 ---> 0c87661179ee
Step 17/19 : HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
 ---> Running in 6233c472670d
Removing intermediate container 6233c472670d
 ---> 19cf305ab999
Step 18/19 : WORKDIR ${ORACLE_HOME}
 ---> Running in f55ba3099d77
Removing intermediate container f55ba3099d77
 ---> 6cb61c41c12e
Step 19/19 : CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]
 ---> Running in c460c0d62829
Removing intermediate container c460c0d62829
 ---> a63e1c89480e
Successfully built a63e1c89480e
Successfully tagged oracle/weblogic:14.1.1.0-generic-11

  WebLogic Docker Image for 'generic-11' version 14.1.1.0 is ready to be extended:

    --> oracle/weblogic:14.1.1.0-generic-11

  Build completed in 90 seconds.

List created images
dave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ docker images
REPOSITORY                            TAG                   IMAGE ID       CREATED              SIZE
oracle/weblogic                       14.1.1.0-generic-11   a63e1c89480e   38 seconds ago       1.27GB
<none>                                <none>                a6efff1e460a   About a minute ago   1.91GB
<none>                                <none>                74fc89d6f899   4 minutes ago        1.91GB
oracle/jdk                            11-ol7                fea3c351284b   38 minutes ago       451MB
<none>                                <none>                dcacebd8006e   39 minutes ago       1.14GB
oraclelinux                           7-slim                506c06ed74d4   3 weeks ago          138MB

List of files used See repo
ave@dave:/git/weblogic/docker-images/docker-weblogic-14.1.1.0/dockerfiles$ find
.
./14.1.1.0
./14.1.1.0/Checksum.developer
./14.1.1.0/Checksum.generic
./14.1.1.0/Checksum.slim
./14.1.1.0/Dockerfile.developer-11
./14.1.1.0/Dockerfile.developer-8
./14.1.1.0/Dockerfile.generic-8
./14.1.1.0/Dockerfile.slim-11
./14.1.1.0/Dockerfile.slim-8
./14.1.1.0/README.md
./14.1.1.0/container-scripts
./14.1.1.0/container-scripts/create-wls-domain.py
./14.1.1.0/container-scripts/createAndStartEmptyDomain.sh
./14.1.1.0/container-scripts/get_healthcheck_url.sh
./14.1.1.0/fmw_14.1.1.0.0_wls_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_quick_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_slim_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_quick_Disk1_1of1.zip.download
./14.1.1.0/fmw_14.1.1.0.0_wls_quick_slim_Disk1_1of1.zip.download
./14.1.1.0/install.file
./14.1.1.0/oraInst.loc
./14.1.1.0/properties
./14.1.1.0/properties/domain.properties
./14.1.1.0/fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip
./14.1.1.0/Dockerfile.generic-11
./buildDockerImage.sh

Create Docker Oracle Java 11 image

 Installation packages


See also

GitHub 

Build JDK 11 image


dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ ./build.sh 
Building Oracle JDK 11 on Oracle Linux 7 slim
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  169.9MB
Step 1/15 : FROM oraclelinux:7-slim as builder
7-slim: Pulling from library/oraclelinux
11a38aebcb7a: Pull complete 
Digest: sha256:7aa9abbeb4e78d0717c46a63cb90a3285359b0753413bd2f2f5e39e9a7d5993c
Status: Downloaded newer image for oraclelinux:7-slim
 ---> 506c06ed74d4
Step 2/15 : LABEL maintainer="Aurelio Garcia-Ribeyro <aurelio.garciaribeyro@oracle.com>"
 ---> Running in a9eeecc8ae9a
Removing intermediate container a9eeecc8ae9a
 ---> c4d64e58c179
Step 3/15 : RUN yum install -y gzip tar
 ---> Running in 20445878bfb0
Loaded plugins: ovl
Package 2:tar-1.26-35.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gzip.x86_64 0:1.5-11.el7_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch            Version                Repository           Size
================================================================================
Installing:
 gzip          x86_64          1.5-11.el7_9           ol7_latest          129 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 129 k
Installed size: 245 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gzip-1.5-11.el7_9.x86_64                                     1/1 
  Verifying  : gzip-1.5-11.el7_9.x86_64                                     1/1 

Installed:
  gzip.x86_64 0:1.5-11.el7_9                                                    

Complete!
Removing intermediate container 20445878bfb0
 ---> 5794fc4428d6
Step 4/15 : ENV LANG en_US.UTF-8
 ---> Running in dd4f6ce453be
Removing intermediate container dd4f6ce453be
 ---> 79ac18c8737a
Step 5/15 : ENV JAVA_HOME=/usr/java/jdk-11
 ---> Running in 55a2120fc569
Removing intermediate container 55a2120fc569
 ---> 24e9614dd3ca
Step 6/15 : COPY *.tar.gz /tmp/
 ---> db81332ba08a
Step 7/15 : SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 ---> Running in 5646dca1c66e
Removing intermediate container 5646dca1c66e
 ---> 91eba2ae2a71
Step 8/15 : RUN set -eux;     ARCH="$(uname -m)" &&     if [ "$ARCH" = "x86_64" ];     then         mv "$(ls /tmp/jdk-11*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ;         JAVA_SHA256=b4eb49c123e2cf2ed7cb068a37b84eb75fcf1e76c3620d3378f5735e11a8508b ;     else         mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ;         JAVA_SHA256=d6b26336a467768d0ec1474dbfdc68df0aa0745e8e46871f0aa46a07851097df ;     fi &&     echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -;     mkdir -p "$JAVA_HOME";     tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
 ---> Running in 8a8a5bef2431
++ uname -m
+ ARCH=x86_64
+ '[' x86_64 = x86_64 ']'
++ ls /tmp/jdk-11.0.20_linux-x64_bin.tar.gz
+ mv /tmp/jdk-11.0.20_linux-x64_bin.tar.gz /tmp/jdk.tar.gz
+ JAVA_SHA256=b4eb49c123e2cf2ed7cb068a37b84eb75fcf1e76c3620d3378f5735e11a8508b
+ echo 'b4eb49c123e2cf2ed7cb068a37b84eb75fcf1e76c3620d3378f5735e11a8508b */tmp/jdk.tar.gz'
+ sha256sum -c -
/tmp/jdk.tar.gz: OK
+ mkdir -p /usr/java/jdk-11
+ tar --extract --file /tmp/jdk.tar.gz --directory /usr/java/jdk-11 --strip-components 1
Removing intermediate container 8a8a5bef2431
 ---> dcacebd8006e
Step 9/15 : FROM oraclelinux:7-slim
 ---> 506c06ed74d4
Step 10/15 : ENV LANG en_US.UTF-8
 ---> Running in d89d29d6ba65
Removing intermediate container d89d29d6ba65
 ---> 4f4c16a907dc
Step 11/15 : ENV JAVA_HOME=/usr/java/jdk-11
 ---> Running in 4563545f4b8b
Removing intermediate container 4563545f4b8b
 ---> 7cdea07e15df
Step 12/15 : ENV    PATH $JAVA_HOME/bin:$PATH
 ---> Running in 739e33df5e6f
Removing intermediate container 739e33df5e6f
 ---> 84bc9560aba7
Step 13/15 : COPY --from=builder $JAVA_HOME $JAVA_HOME
 ---> 53437439b590
Step 14/15 : RUN set -eux;     yum -y update;     yum install -y         freetype fontconfig     ;     rm -rf /var/cache/yum;     ln -sfT "$JAVA_HOME" /usr/java/default;     ln -sfT "$JAVA_HOME" /usr/java/latest;     for bin in "$JAVA_HOME/bin/"*; do         base="$(basename "$bin")";         [ ! -e "/usr/bin/$base" ];         alternatives --install "/usr/bin/$base" "$base" "$bin" 20000;     done;     java -Xshare:dump;
 ---> Running in 87543eaeb535
+ yum -y update
Loaded plugins: ovl
Resolving Dependencies
--> Running transaction check
---> Package libblkid.x86_64 0:2.23.2-65.0.3.el7_9.1 will be updated
---> Package libblkid.x86_64 0:2.23.2-65.0.4.el7_9.1 will be an update
---> Package libmount.x86_64 0:2.23.2-65.0.3.el7_9.1 will be updated
---> Package libmount.x86_64 0:2.23.2-65.0.4.el7_9.1 will be an update
---> Package libuuid.x86_64 0:2.23.2-65.0.3.el7_9.1 will be updated
---> Package libuuid.x86_64 0:2.23.2-65.0.4.el7_9.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package        Arch         Version                     Repository        Size
================================================================================
Updating:
 libblkid       x86_64       2.23.2-65.0.4.el7_9.1       ol7_latest       183 k
 libmount       x86_64       2.23.2-65.0.4.el7_9.1       ol7_latest       185 k
 libuuid        x86_64       2.23.2-65.0.4.el7_9.1       ol7_latest        84 k

Transaction Summary
================================================================================
Upgrade  3 Packages

Total download size: 452 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total                                              1.1 MB/s | 452 kB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libuuid-2.23.2-65.0.4.el7_9.1.x86_64                         1/6 
  Updating   : libblkid-2.23.2-65.0.4.el7_9.1.x86_64                        2/6 
  Updating   : libmount-2.23.2-65.0.4.el7_9.1.x86_64                        3/6 
  Cleanup    : libmount-2.23.2-65.0.3.el7_9.1.x86_64                        4/6 
  Cleanup    : libblkid-2.23.2-65.0.3.el7_9.1.x86_64                        5/6 
  Cleanup    : libuuid-2.23.2-65.0.3.el7_9.1.x86_64                         6/6 
  Verifying  : libuuid-2.23.2-65.0.4.el7_9.1.x86_64                         1/6 
  Verifying  : libmount-2.23.2-65.0.4.el7_9.1.x86_64                        2/6 
  Verifying  : libblkid-2.23.2-65.0.4.el7_9.1.x86_64                        3/6 
  Verifying  : libuuid-2.23.2-65.0.3.el7_9.1.x86_64                         4/6 
  Verifying  : libblkid-2.23.2-65.0.3.el7_9.1.x86_64                        5/6 
  Verifying  : libmount-2.23.2-65.0.3.el7_9.1.x86_64                        6/6 

Updated:
  libblkid.x86_64 0:2.23.2-65.0.4.el7_9.1                                       
  libmount.x86_64 0:2.23.2-65.0.4.el7_9.1                                       
  libuuid.x86_64 0:2.23.2-65.0.4.el7_9.1                                        

Complete!
+ yum install -y freetype fontconfig
Loaded plugins: ovl
Resolving Dependencies
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
---> Package freetype.x86_64 0:2.8-14.el7_9.1 will be installed
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: freetype-2.8-14.el7_9.1.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: freetype-2.8-14.el7_9.1.x86_64
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package libpng.x86_64 2:1.5.13-8.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch       Version            Repository      Size
================================================================================
Installing:
 fontconfig                  x86_64     2.13.0-4.3.el7     ol7_latest     254 k
 freetype                    x86_64     2.8-14.el7_9.1     ol7_latest     380 k
Installing for dependencies:
 dejavu-fonts-common         noarch     2.33-6.el7         ol7_latest      64 k
 dejavu-sans-fonts           noarch     2.33-6.el7         ol7_latest     1.4 M
 fontpackages-filesystem     noarch     1.44-8.el7         ol7_latest     9.4 k
 libpng                      x86_64     2:1.5.13-8.el7     ol7_latest     212 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)

Total download size: 2.3 M
Installed size: 7.3 M
Downloading packages:
--------------------------------------------------------------------------------
Total                                              5.5 MB/s | 2.3 MB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fontpackages-filesystem-1.44-8.el7.noarch                    1/6 
  Installing : dejavu-fonts-common-2.33-6.el7.noarch                        2/6 
  Installing : dejavu-sans-fonts-2.33-6.el7.noarch                          3/6 
  Installing : 2:libpng-1.5.13-8.el7.x86_64                                 4/6 
  Installing : freetype-2.8-14.el7_9.1.x86_64                               5/6 
  Installing : fontconfig-2.13.0-4.3.el7.x86_64                             6/6 
  Verifying  : fontconfig-2.13.0-4.3.el7.x86_64                             1/6 
  Verifying  : dejavu-fonts-common-2.33-6.el7.noarch                        2/6 
  Verifying  : dejavu-sans-fonts-2.33-6.el7.noarch                          3/6 
  Verifying  : 2:libpng-1.5.13-8.el7.x86_64                                 4/6 
  Verifying  : freetype-2.8-14.el7_9.1.x86_64                               5/6 
  Verifying  : fontpackages-filesystem-1.44-8.el7.noarch                    6/6 

Installed:
  fontconfig.x86_64 0:2.13.0-4.3.el7      freetype.x86_64 0:2.8-14.el7_9.1     

Dependency Installed:
  dejavu-fonts-common.noarch 0:2.33-6.el7                                       
  dejavu-sans-fonts.noarch 0:2.33-6.el7                                         
  fontpackages-filesystem.noarch 0:1.44-8.el7                                   
  libpng.x86_64 2:1.5.13-8.el7                                                  

Complete!
+ rm -rf /var/cache/yum
+ ln -sfT /usr/java/jdk-11 /usr/java/default
+ ln -sfT /usr/java/jdk-11 /usr/java/latest
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jar
+ base=jar
+ '[' '!' -e /usr/bin/jar ']'
+ alternatives --install /usr/bin/jar jar /usr/java/jdk-11/bin/jar 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jarsigner
+ base=jarsigner
+ '[' '!' -e /usr/bin/jarsigner ']'
+ alternatives --install /usr/bin/jarsigner jarsigner /usr/java/jdk-11/bin/jarsigner 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/java
+ base=java
+ '[' '!' -e /usr/bin/java ']'
+ alternatives --install /usr/bin/java java /usr/java/jdk-11/bin/java 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/javac
+ base=javac
+ '[' '!' -e /usr/bin/javac ']'
+ alternatives --install /usr/bin/javac javac /usr/java/jdk-11/bin/javac 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/javadoc
+ base=javadoc
+ '[' '!' -e /usr/bin/javadoc ']'
+ alternatives --install /usr/bin/javadoc javadoc /usr/java/jdk-11/bin/javadoc 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/javap
+ base=javap
+ '[' '!' -e /usr/bin/javap ']'
+ alternatives --install /usr/bin/javap javap /usr/java/jdk-11/bin/javap 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jcmd
+ base=jcmd
+ '[' '!' -e /usr/bin/jcmd ']'
+ alternatives --install /usr/bin/jcmd jcmd /usr/java/jdk-11/bin/jcmd 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jconsole
+ base=jconsole
+ '[' '!' -e /usr/bin/jconsole ']'
+ alternatives --install /usr/bin/jconsole jconsole /usr/java/jdk-11/bin/jconsole 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jdb
+ base=jdb
+ '[' '!' -e /usr/bin/jdb ']'
+ alternatives --install /usr/bin/jdb jdb /usr/java/jdk-11/bin/jdb 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jdeprscan
+ base=jdeprscan
+ '[' '!' -e /usr/bin/jdeprscan ']'
+ alternatives --install /usr/bin/jdeprscan jdeprscan /usr/java/jdk-11/bin/jdeprscan 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jdeps
+ base=jdeps
+ '[' '!' -e /usr/bin/jdeps ']'
+ alternatives --install /usr/bin/jdeps jdeps /usr/java/jdk-11/bin/jdeps 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jfr
+ base=jfr
+ '[' '!' -e /usr/bin/jfr ']'
+ alternatives --install /usr/bin/jfr jfr /usr/java/jdk-11/bin/jfr 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jhsdb
+ base=jhsdb
+ '[' '!' -e /usr/bin/jhsdb ']'
+ alternatives --install /usr/bin/jhsdb jhsdb /usr/java/jdk-11/bin/jhsdb 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jimage
+ base=jimage
+ '[' '!' -e /usr/bin/jimage ']'
+ alternatives --install /usr/bin/jimage jimage /usr/java/jdk-11/bin/jimage 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jinfo
+ base=jinfo
+ '[' '!' -e /usr/bin/jinfo ']'
+ alternatives --install /usr/bin/jinfo jinfo /usr/java/jdk-11/bin/jinfo 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jjs
+ base=jjs
+ '[' '!' -e /usr/bin/jjs ']'
+ alternatives --install /usr/bin/jjs jjs /usr/java/jdk-11/bin/jjs 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jlink
+ base=jlink
+ '[' '!' -e /usr/bin/jlink ']'
+ alternatives --install /usr/bin/jlink jlink /usr/java/jdk-11/bin/jlink 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jmap
+ base=jmap
+ '[' '!' -e /usr/bin/jmap ']'
+ alternatives --install /usr/bin/jmap jmap /usr/java/jdk-11/bin/jmap 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jmod
+ base=jmod
+ '[' '!' -e /usr/bin/jmod ']'
+ alternatives --install /usr/bin/jmod jmod /usr/java/jdk-11/bin/jmod 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jps
+ base=jps
+ '[' '!' -e /usr/bin/jps ']'
+ alternatives --install /usr/bin/jps jps /usr/java/jdk-11/bin/jps 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jrunscript
+ base=jrunscript
+ '[' '!' -e /usr/bin/jrunscript ']'
+ alternatives --install /usr/bin/jrunscript jrunscript /usr/java/jdk-11/bin/jrunscript 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jshell
+ base=jshell
+ '[' '!' -e /usr/bin/jshell ']'
+ alternatives --install /usr/bin/jshell jshell /usr/java/jdk-11/bin/jshell 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jstack
+ base=jstack
+ '[' '!' -e /usr/bin/jstack ']'
+ alternatives --install /usr/bin/jstack jstack /usr/java/jdk-11/bin/jstack 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jstat
+ base=jstat
+ '[' '!' -e /usr/bin/jstat ']'
+ alternatives --install /usr/bin/jstat jstat /usr/java/jdk-11/bin/jstat 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/jstatd
+ base=jstatd
+ '[' '!' -e /usr/bin/jstatd ']'
+ alternatives --install /usr/bin/jstatd jstatd /usr/java/jdk-11/bin/jstatd 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/keytool
+ base=keytool
+ '[' '!' -e /usr/bin/keytool ']'
+ alternatives --install /usr/bin/keytool keytool /usr/java/jdk-11/bin/keytool 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/pack200
+ base=pack200
+ '[' '!' -e /usr/bin/pack200 ']'
+ alternatives --install /usr/bin/pack200 pack200 /usr/java/jdk-11/bin/pack200 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/rmic
+ base=rmic
+ '[' '!' -e /usr/bin/rmic ']'
+ alternatives --install /usr/bin/rmic rmic /usr/java/jdk-11/bin/rmic 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/rmid
+ base=rmid
+ '[' '!' -e /usr/bin/rmid ']'
+ alternatives --install /usr/bin/rmid rmid /usr/java/jdk-11/bin/rmid 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/rmiregistry
+ base=rmiregistry
+ '[' '!' -e /usr/bin/rmiregistry ']'
+ alternatives --install /usr/bin/rmiregistry rmiregistry /usr/java/jdk-11/bin/rmiregistry 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/serialver
+ base=serialver
+ '[' '!' -e /usr/bin/serialver ']'
+ alternatives --install /usr/bin/serialver serialver /usr/java/jdk-11/bin/serialver 20000
+ for bin in '"$JAVA_HOME/bin/"*'
++ basename /usr/java/jdk-11/bin/unpack200
+ base=unpack200
+ '[' '!' -e /usr/bin/unpack200 ']'
+ alternatives --install /usr/bin/unpack200 unpack200 /usr/java/jdk-11/bin/unpack200 20000
+ java -Xshare:dump
narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000
Allocated shared space: 3221225472 bytes at 0x0000000800000000
Loading classes to share ...
Loading classes to share: done.
Rewriting and linking classes ...
Rewriting and linking classes: done
Number of classes 1216
    instance classes   =  1156
    obj array classes  =    52
    type array classes =     8
Updating ConstMethods ... done. 
Removing unshareable information ... done. 
Scanning all metaspace objects ... 
Allocating RW objects ... 
Allocating RO objects ... 
Relocating embedded pointers ... 
Relocating external roots ... 
Dumping symbol table ...
Dumping objects to closed archive heap region ...
Dumping objects to open archive heap region ...
Relocating SystemDictionary::_well_known_klasses[] ... 
Removing java_mirror ... done. 
mc  space:      8144 [  0.1% of total] out of      8192 bytes [ 99.4% used] at 0x0000000800000000
rw  space:   3818304 [ 32.5% of total] out of   3821568 bytes [ 99.9% used] at 0x0000000800002000
ro  space:   7099752 [ 60.4% of total] out of   7102464 bytes [100.0% used] at 0x00000008003a7000
md  space:      2560 [  0.0% of total] out of      4096 bytes [ 62.5% used] at 0x0000000800a6d000
st0 space:    409600 [  3.5% of total] out of    409600 bytes [100.0% used] at 0x00000007bff00000
oa0 space:    212992 [  1.8% of total] out of    212992 bytes [100.0% used] at 0x00000007bfe00000
bm  space:    196616 [  1.7% of total] out of    196616 bytes [100.0% used] at 0x0000000000000000
total    :  11551352 [100.0% of total] out of  11755528 bytes [ 98.3% used]
Removing intermediate container 87543eaeb535
 ---> 18be8724b598
Step 15/15 : CMD ["jshell"]
 ---> Running in 7ea3469bb982
Removing intermediate container 7ea3469bb982
 ---> fea3c351284b
Successfully built fea3c351284b
Successfully tagged oracle/jdk:11-ol7

List images
dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$ docker images
REPOSITORY                            TAG       IMAGE ID       CREATED         SIZE
oracle/jdk                            11-ol7    fea3c351284b   6 minutes ago   451MB
<none>                                <none>    dcacebd8006e   6 minutes ago   1.14GB
oraclelinux                           7-slim    506c06ed74d4   3 weeks ago     138MB

Run Java 11 image
dave@dave:/git/weblogic/docker-images/docker-oracle-java-11$  docker run -it  oracle/jdk:11-ol7
Dec 10, 2023 12:39:22 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
|  Welcome to JShell -- Version 11.0.20
|  For an introduction type: /help intro

jshell> /help
|  Type a Java language expression, statement, or declaration.
|  Or type one of the following commands:
|  /list [<name or id>|-all|-start]
|      list the source you have typed
|  /edit <name or id>
|      edit a source entry
|  /drop <name or id>
|      delete a source entry
|  /save [-all|-history|-start] <file>
|      Save snippet source to a file
|  /open <file>
|      open a file as source input
|  /vars [<name or id>|-all|-start]
|      list the declared variables and their values
|  /methods [<name or id>|-all|-start]
|      list the declared methods and their signatures
|  /types [<name or id>|-all|-start]
|      list the type declarations
|  /imports 
|      list the imported items
|  /exit [<integer-expression-snippet>]
|      exit the jshell tool
|  /env [-class-path <path>] [-module-path <path>] [-add-modules <modules>] ...
|      view or change the evaluation context
|  /reset [-class-path <path>] [-module-path <path>] [-add-modules <modules>]...
|      reset the jshell tool
|  /reload [-restore] [-quiet] [-class-path <path>] [-module-path <path>]...
|      reset and replay relevant history -- current or previous (-restore)
|  /history [-all]
|      history of what you have typed
|  /help [<command>|<subject>]
|      get information about using the jshell tool
|  /set editor|start|feedback|mode|prompt|truncation|format ...
|      set configuration information
|  /? [<command>|<subject>]
|      get information about using the jshell tool
|  /! 
|      rerun last snippet -- see /help rerun
|  /<id> 
|      rerun snippets by ID or ID range -- see /help rerun
|  /-<n> 
|      rerun n-th previous snippet -- see /help rerun
|  
|  For more information type '/help' followed by the name of a
|  command or a subject.
|  For example '/help /list' or '/help intro'.
|  
|  Subjects:
|  
|  intro
|      an introduction to the jshell tool
|  keys
|      a description of readline-like input editing
|  id
|      a description of snippet IDs and how use them
|  shortcuts
|      a description of keystrokes for snippet and command completion,
|      information access, and automatic code generation
|  context
|      a description of the evaluation context options for /env /reload and /reset
|  rerun
|      a description of ways to re-evaluate previously entered snippets

jshell> 


Wednesday, November 22, 2023

Weblogic Kubernetes (k8s) Operator

 HOWTO

Weblogic k8s operator


Setup k8s 

Weblogic k8s operator

Installation
Minikube
HOWTO

Openshift 
General HOWTO

Weblogic Docker image and domain creation

Weblogic 12.2.1.4
Weblogic 14.1.1


Docker networking 

Weblogic domain

k8s in Google Cloud 




Weblogic Server Clustering

Oracle HOWTO

See also 

https://danielveselka.blogspot.com/2009/09/using-weblogic-clusters.html