Skip to content

Commit 644b2f0

Browse files
authored
Allow update image of 12.2.1.4 slim images (#360)
* Allow update image of 12.2.1.4 slim images * improving coverage * updated WDT use_encryption text to be code font
1 parent 9b658db commit 644b2f0

File tree

12 files changed

+357
-160
lines changed

12 files changed

+357
-160
lines changed

documentation/1.11/content/userguide/tools/update-image.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,45 +25,46 @@ Update WebLogic Docker image with selected patches
2525
```
2626
| Parameter | Definition | Default |
2727
| --- | --- | --- |
28-
| `--fromImage` | (Required) Container image to be extended. The provided image MUST contain an Oracle Home with middleware installed. The `fromImage` option serves as a starting point for the new image to be created. | |
29-
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
30-
| `--additionalBuildCommands` | Path to a file with additional build commands. For more details, see [Additional information](#--additionalbuildcommands). |
31-
| `--additionalBuildFiles` | Additional files that are required by your `additionalBuildCommands`. A comma separated list of files that should be copied to the build context. See [Additional information](#--additionalbuildfiles). |
32-
| `--builder`, `-b` | Executable to process the Dockerfile. Use the full path of the executable if not on your path. | `docker` |
33-
| `--buildNetwork` | Networking mode for the RUN instructions during the image build. See `--network` for Docker `build`. | |
34-
| `--chown` | `userid:groupid` for middleware patches and other operations. | Owner:Group of the Oracle Home |
35-
| `--dryRun` | Skip Docker build execution and print the Dockerfile to stdout. | |
36-
| `--httpProxyUrl` | Proxy for the HTTP protocol. Example: `http://myproxy:80` or `http:user:passwd@myproxy:8080` | |
37-
| `--httpsProxyUrl` | Proxy for the HTTPS protocol. Example: `https://myproxy:80` or `https:user:passwd@myproxy:8080` | |
38-
| `--latestPSU` | (DEPRECATED) Find and apply the latest PatchSet Update, see [Additional information](#--latestpsu). | |
39-
| `--opatchBugNumber` | The patch number for OPatch (patching OPatch). | `28186730` |
40-
| `--password` | Request password for the Oracle Support `--user` on STDIN, see `--user`. | |
41-
| `--passwordEnv` | Environment variable containing the Oracle Support password, see `--user`. | |
42-
| `--passwordFile` | Path to a file containing just the Oracle Support password, see `--user`. | |
43-
| `--patches` | Comma separated list of patch IDs. Example: `12345678,87654321` | |
44-
| `--pull` | Always attempt to pull a newer version of base images during the build. | |
45-
| `--recommendedPatches` | (DEPRECATED) Find and apply the latest PatchSet Update and recommended patches. This takes precedence over `--latestPSU`. See [Additional information](#--recommendedpatches). | |
46-
| `--resourceTemplates` | One or more files containing placeholders that need to be resolved by the Image Tool. See [Resource Template Files](#resource-template-files). | |
47-
| `--skipcleanup` | Do not delete the build context folder, intermediate images, and failed build containers. For debugging purposes. | |
48-
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
49-
| `--target` | Select the target environment in which the created image will be used. Supported values: `Default` (Docker/Kubernetes), `OpenShift`. See [Additional information](#--target). | `Default` |
50-
| `--user` | Oracle support email ID. When supplying `user`, you must supply the password either as an environment variable using `--passwordEnv`, or as a file using `--passwordFile`, or interactively, on the command line with `--password`.   | |
51-
| `--wdtArchive` | A WDT archive ZIP file or comma-separated list of files. | |
52-
| `--wdtDomainHome` | Path to the `-domain_home` for WDT. | `/u01/domains/base_domain` |
53-
| `--wdtDomainType` | WDT domain type. Supported values: `WLS`, `JRF`, `RestrictedJRF` | `WLS` |
54-
| `--wdtEncryptionKey` | Passphrase for WDT -use_encryption that will be requested on STDIN. | |
55-
| `--wdtEncryptionKeyEnv` | Passphrase for WDT -use_encryption that is provided as an environment variable. | |
56-
| `--wdtEncryptionKeyFile` | Passphrase for WDT -use_encryption that is provided as a file. | |
57-
| `--wdtHome` | The target folder in the image for the WDT install and models. | `/u01/wdt` |
58-
| `--wdtJavaOptions` | Java command-line options for WDT. | |
59-
| `--wdtModel` | A WDT model file or a comma-separated list of files. | |
28+
| `--fromImage` | (Required) Container image to be extended. The provided image MUST contain an Oracle Home with middleware installed. The `fromImage` option serves as a starting point for the new image to be created. | |
29+
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
30+
| `--additionalBuildCommands` | Path to a file with additional build commands. For more details, see [Additional information](#--additionalbuildcommands). | |
31+
| `--additionalBuildFiles` | Additional files that are required by your `additionalBuildCommands`. A comma separated list of files that should be copied to the build context. See [Additional information](#--additionalbuildfiles). | |
32+
| `--builder`, `-b` | Executable to process the Dockerfile. Use the full path of the executable if not on your path. | `docker` |
33+
| `--buildNetwork` | Networking mode for the RUN instructions during the image build. See `--network` for Docker `build`. | |
34+
| `--chown` | `userid:groupid` for middleware patches and other operations. | Owner:Group of the Oracle Home |
35+
| `--dryRun` | Skip Docker build execution and print the Dockerfile to stdout. | |
36+
| `--httpProxyUrl` | Proxy for the HTTP protocol. Example: `http://myproxy:80` or `http:user:passwd@myproxy:8080` | |
37+
| `--httpsProxyUrl` | Proxy for the HTTPS protocol. Example: `https://myproxy:80` or `https:user:passwd@myproxy:8080` | |
38+
| `--latestPSU` | (DEPRECATED) Find and apply the latest PatchSet Update, see [Additional information](#--latestpsu). | |
39+
| `--opatchBugNumber` | The patch number for OPatch (patching OPatch). | `28186730` |
40+
| `--password` | Request password for the Oracle Support `--user` on STDIN, see `--user`. | |
41+
| `--passwordEnv` | Environment variable containing the Oracle Support password, see `--user`. | |
42+
| `--passwordFile` | Path to a file containing just the Oracle Support password, see `--user`. | |
43+
| `--patches` | Comma separated list of patch IDs. Example: `12345678,87654321` | |
44+
| `--pull` | Always attempt to pull a newer version of base images during the build. | |
45+
| `--recommendedPatches` | (DEPRECATED) Find and apply the latest PatchSet Update and recommended patches. This takes precedence over `--latestPSU`. See [Additional information](#--recommendedpatches). | |
46+
| `--resourceTemplates` | One or more files containing placeholders that need to be resolved by the Image Tool. See [Resource Template Files](#resource-template-files). | |
47+
| `--skipcleanup` | Do not delete the build context folder, intermediate images, and failed build containers. For debugging purposes. | |
48+
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
49+
| `--target` | Select the target environment in which the created image will be used. Supported values: `Default` (Docker/Kubernetes), `OpenShift`. See [Additional information](#--target). | `Default` |
50+
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `OSB`, `OUD_WLS`, `SOA_OSB`, `SOA_OSB_B2B`, `MFT`, `WCP`, `OAM`, `OIG`, `OUD`, `OID`, `SOA`, `WCC`, `WCS`, `WCP` | Installer used in `fromImage` |
51+
| `--user` | Oracle support email ID. When supplying `user`, you must supply the password either as an environment variable using `--passwordEnv`, or as a file using `--passwordFile`, or interactively, on the command line with `--password`. | |
52+
| `--wdtArchive` | A WDT archive ZIP file or comma-separated list of files. | |
53+
| `--wdtDomainHome` | Path to the `-domain_home` for WDT. | `/u01/domains/base_domain` |
54+
| `--wdtDomainType` | WDT domain type. Supported values: `WLS`, `JRF`, `RestrictedJRF` | `WLS` |
55+
| `--wdtEncryptionKey` | Passphrase for WDT `-use_encryption` that will be requested on STDIN. | |
56+
| `--wdtEncryptionKeyEnv` | Passphrase for WDT `-use_encryption` that is provided as an environment variable. | |
57+
| `--wdtEncryptionKeyFile` | Passphrase for WDT `-use_encryption` that is provided as a file. | |
58+
| `--wdtHome` | The target folder in the image for the WDT install and models. | `/u01/wdt` |
59+
| `--wdtJavaOptions` | Java command-line options for WDT. | |
60+
| `--wdtModel` | A WDT model file or a comma-separated list of files. | |
6061
| `--wdtModelHome` | The target location in the image to copy WDT model, variable, and archive files. | `{wdtHome}/models` |
61-
| `--wdtModelOnly` | Install WDT and copy the models to the image, but do not create the domain. | `false` |
62-
| `--wdtOperation` | Create a new domain, or update an existing domain. Supported values: `CREATE`, `UPDATE`, `DEPLOY` | `CREATE` |
63-
| `--wdtRunRCU` | Instruct WDT to run RCU when creating the domain. | |
64-
| `--wdtStrictValidation` | Use strict validation for the WDT validation method. Only applies when using model only. | `false` |
65-
| `--wdtVariables` | A WDT variables file or comma-separated list of files. | |
66-
| `--wdtVersion` | WDT tool version to use. | |
62+
| `--wdtModelOnly` | Install WDT and copy the models to the image, but do not create the domain. | `false` |
63+
| `--wdtOperation` | Create a new domain, or update an existing domain. Supported values: `CREATE`, `UPDATE`, `DEPLOY` | `CREATE` |
64+
| `--wdtRunRCU` | Instruct WDT to run RCU when creating the domain. | |
65+
| `--wdtStrictValidation` | Use strict validation for the WDT validation method. Only applies when using model only. | `false` |
66+
| `--wdtVariables` | A WDT variables file or comma-separated list of files. | |
67+
| `--wdtVersion` | WDT tool version to use. | |
6768

6869
### Additional information
6970

imagetool/src/main/java/com/oracle/weblogic/imagetool/cli/menu/CommonCreateOptions.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021, Oracle and/or its affiliates.
1+
// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package com.oracle.weblogic.imagetool.cli.menu;
@@ -11,7 +11,6 @@
1111

1212
import com.oracle.weblogic.imagetool.api.model.CachedFile;
1313
import com.oracle.weblogic.imagetool.aru.AruException;
14-
import com.oracle.weblogic.imagetool.installer.FmwInstallerType;
1514
import com.oracle.weblogic.imagetool.installer.InstallerType;
1615
import com.oracle.weblogic.imagetool.installer.MiddlewareInstall;
1716
import com.oracle.weblogic.imagetool.logging.LoggingFacade;
@@ -42,15 +41,15 @@ void prepareNewImage() throws IOException, InterruptedException, XPathExpression
4241

4342
if (dockerfileOptions.installMiddleware()) {
4443
MiddlewareInstall install =
45-
new MiddlewareInstall(installerType, installerVersion, installerResponseFiles);
44+
new MiddlewareInstall(getInstallerType(), installerVersion, installerResponseFiles);
4645
install.copyFiles(cache(), buildDir());
4746
dockerfileOptions.setMiddlewareInstall(install);
4847
} else {
4948
dockerfileOptions.setWdtBase("os_update");
5049
}
5150

5251
// resolve required patches
53-
handlePatchFiles(installerType);
52+
handlePatchFiles();
5453

5554
// If patching, patch OPatch first
5655
if (applyingPatches() && shouldUpdateOpatch()) {
@@ -76,12 +75,6 @@ String getInstallerVersion() {
7675
return installerVersion;
7776
}
7877

79-
@Option(
80-
names = {"--type"},
81-
description = "Installer type. Default: WLS. Supported values: ${COMPLETION-CANDIDATES}"
82-
)
83-
private FmwInstallerType installerType = FmwInstallerType.WLS;
84-
8578
@Option(
8679
names = {"--version"},
8780
description = "Installer version. Default: ${DEFAULT-VALUE}",

imagetool/src/main/java/com/oracle/weblogic/imagetool/cli/menu/CommonOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2019, 2021, Oracle and/or its affiliates.
1+
// Copyright (c) 2019, 2022, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package com.oracle.weblogic.imagetool.cli.menu;
@@ -250,7 +250,7 @@ public boolean isChownSet() {
250250
return isOptionSet("--chown");
251251
}
252252

253-
private boolean isOptionSet(String optionName) {
253+
boolean isOptionSet(String optionName) {
254254
CommandLine.ParseResult pr = spec.commandLine().getParseResult();
255255
return pr.hasMatchedOption(optionName);
256256
}

0 commit comments

Comments
 (0)