Skip to content

Commit ebb55e4

Browse files
committed
Merge branch 'doc-from-image-props' into 'main'
Add documentation for the fromImageProperties feature See merge request weblogic-cloud/weblogic-image-tool!500
2 parents ff206d1 + 09c847a commit ebb55e4

File tree

2 files changed

+73
-9
lines changed

2 files changed

+73
-9
lines changed

documentation/site/content/userguide/tools/create-aux-image.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@ for [WebLogic Kubernetes Operator - Auxiliary Images](https://oracle.github.io/w
1313
These images are an alternative approach for including Model-in-Image model files, application archive files, WebLogic Deploying Tooling installation files, or other types of files,
1414
in your WebLogic Server Kubernetes Operator environment.
1515

16-
There are a number of optional parameters for this feature. The required option for the command is marked.
16+
There are a number of optional parameters for this feature. The required option for the command is marked in the following table.
1717

1818
```
1919
Usage: imagetool createAuxImage [OPTIONS]
2020
```
2121

2222
| Parameter | Definition | Default |
2323
| --- | --- | --- |
24-
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/mydomain:1` | |
24+
| `--tag` | **(Required)** Tag for the final build image. Example: `store/oracle/mydomain:1` | |
2525
| `--additionalBuildCommands` | Path to a file with additional build commands. For more details, see [Additional information](#--additionalbuildcommands). |
2626
| `--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). |
2727
| `--builder`, `-b` | Executable to process the Dockerfile. Use the full path of the executable if not on your path. | Defaults to `docker`, or, when set, to the value in environment variable `WLSIMG_BUILDER`. |
2828
| `--buildNetwork` | Networking mode for the RUN instructions during the image build. See `--network` for Docker `build`. | |
2929
| `--chown` | `userid:groupid` to be used for creating files within the image, such as the WDT installer, WDT model, and WDT archive. If the user or group does not exist in the image, they will be added with useradd/groupadd. | `oracle:oracle` |
3030
| `--dryRun` | Skip Docker build execution and print the Dockerfile to stdout. | |
3131
| `--fromImage` | Container image to use as a base image when creating a new image. | `busybox` |
32+
| `--fromImageProperties` | Properties that describe the `--fromImage`. If not provided, docker run will be used to inspect the `--fromImage` image. See [Custom Base Images](#custom-base-images) | |
3233
| `--httpProxyUrl` | Proxy for the HTTP protocol. Example: `http://myproxy:80` or `http:user:passwd@myproxy:8080` | |
3334
| `--httpsProxyUrl` | Proxy for the HTTPS protocol. Example: `https://myproxy:80` or `https:user:passwd@myproxy:8080` | |
3435
| `--packageManager` | Override the default package manager for the base image's operating system. Supported values: `APK`, `APTGET`, `NONE`, `YUM`, `ZYPPER` | |
@@ -81,7 +82,9 @@ on when the build needs access to the file. For example, if the file is needed
8182
installation or domain creation steps, use the `final-build-commands` section so that the `COPY` command occurs in the
8283
final stage of the image build.
8384

84-
#### `--target`
85+
#### Using OpenShift
86+
87+
##### `--target`
8588

8689
The file permissions in the Auxiliary image should match the container image where WebLogic Server is installed.
8790
The target option is supplied for Auxiliary images as a convenience to simplify creating images with the same owner:group file permissions.
@@ -92,6 +95,36 @@ Use the same value for `--target` when creating images with `create` and `create
9295
| `Default` | `rwxr-x---` | `oracle:oracle` |
9396
| `OpenShift` | `rwxrwx---` | `oracle:root` |
9497

98+
#### Custom Base Images
99+
100+
##### `--fromImageProperties`
101+
102+
When specifying `--fromImage` to override the default base image, Image Tool needs additional information about the
103+
image that is being provided, such as the installed operating system and version. By default, the additional information
104+
is gathered automatically by the Image Tool using `docker run`. If it is desirable to provide that additional information
105+
manually and avoid the `docker run` step, `--fromImageProperties` must be provided with the additional information using
106+
a Java Properties file. The file must be a line-oriented format with key-value pairs separated by `=`. For example:
107+
```properties
108+
packageManager=MICRODNF
109+
__OS__ID="ol"
110+
__OS__VERSION="8.10"
111+
```
112+
Required properties:
113+
114+
| Key | Description | Default |
115+
| --- | --- | --- |
116+
| `packageManager` | The name of the installed package manager in the `fromImage` in all CAPS. Like `DNF`, `MICRODNF`, and `YUM` | `YUM` |
117+
| `__OS__ID` | The ID value found in `/etc/os-release`. Like "ol" for Oracle Linux, or "bb" for BusyBox. | |
118+
| `__OS__VERSION` | The VERSION value found in `/etc/os-release`. Like "8.10". | |
119+
120+
Additional properties:
121+
122+
| Key | Description |
123+
| --- | --- |
124+
| `javaHome` | The location where the JDK is pre-installed. Like "/u01/jdk". |
125+
| `__OS__arch` | The output of `uname -m`. Like `amd64` or `arm64`. |
126+
127+
95128
#### `--wdtVersion`
96129

97130
As of version 1.11.0, you may opt to install WDT and the model files in separate images. By default, the cached `wdt_latest`

documentation/site/content/userguide/tools/create-image.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: "The create command creates a new container image and installs the
88

99

1010
The `create` command helps build a WebLogic container image from a given base OS image.
11-
There are a number of optional parameters for this feature. The required option for the command is marked.
11+
There are a number of optional parameters for this feature. The required option for the command is marked in the following table.
1212

1313
**NOTE**: The WebLogic Image Tool does not support a Stack Patch Bundle (SPB; see Doc ID [2764636.1](https://support.oracle.com/rs?type=doc&id=2764636.1)), because an SPB is _not_ a patch but a mechanism for applying all PSU and recommended CPU and SPU patches to a WebLogic Server installation, similar to invoking the Image Tool `create` command with the `--recommendedPatches` option.
1414

@@ -18,7 +18,7 @@ Usage: imagetool create [OPTIONS]
1818

1919
| Parameter | Definition | Default |
2020
| --- | --- | --- |
21-
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
21+
| `--tag` | **(Required)** Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
2222
| `--additionalBuildCommands` | Path to a file with additional build commands. For more details, see [Additional information](#--additionalbuildcommands). |
2323
| `--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). |
2424
| `--builder`, `-b` | Executable to process the Dockerfile. Use the full path of the executable if not on your path. | Defaults to `docker`, or, when set, to the value in environment variable `WLSIMG_BUILDER`. |
@@ -27,6 +27,7 @@ Usage: imagetool create [OPTIONS]
2727
| `--docker` | (DEPRECATED) Path to the Docker executable. Use `--builder` instead. | `docker` |
2828
| `--dryRun` | Skip Docker build execution and print the Dockerfile to stdout. | |
2929
| `--fromImage` | Container image to use as a base image when creating a new image. | `ghcr.io/oracle/oraclelinux:8-slim` |
30+
| `--fromImageProperties` | Properties that describe the `--fromImage`. If not provided, docker run will be used to inspect the `--fromImage` image. See [Custom Base Images](#custom-base-images) | |
3031
| `--httpProxyUrl` | Proxy for the HTTP protocol. Example: `http://myproxy:80` or `http:user:passwd@myproxy:8080` | |
3132
| `--httpsProxyUrl` | Proxy for the HTTPS protocol. Example: `https://myproxy:80` or `https:user:passwd@myproxy:8080` | |
3233
| `--installerResponseFile` | One or more custom response files. A comma separated list of paths to installer response files. Overrides the default responses for the Oracle silent installer. | |
@@ -119,9 +120,11 @@ installation or domain creation steps, use the `final-build-commands` section so
119120
final stage of the image build. Or, if the file needs to change the Oracle Home prior to domain creation, use
120121
the `after-fmw-install` or `before-wdt-command` sections.
121122

122-
#### `--target`
123+
#### Using OpenShift
123124

124-
By default, the generated WLS domain in your image will use the best practices defined by Oracle WebLogic Server.
125+
##### `--target`
126+
127+
By default, the installed middleware will default file permissions to `rwxr-x---`.
125128
The `target` option allows you to toggle the defaults so that the generated domain is easier to use in the target
126129
environment. For example, the `--target OpenShift` option will change the file permissions in the domain directory
127130
so that the group permissions match the user permissions.
@@ -131,6 +134,36 @@ so that the group permissions match the user permissions.
131134
| `Default` | `rwxr-x---` | `oracle:oracle` |
132135
| `OpenShift` | `rwxrwx---` | `oracle:root` |
133136

137+
#### Custom Base Images
138+
139+
##### `--fromImageProperties`
140+
141+
When specifying `--fromImage` to override the default base image, Image Tool needs additional information about the
142+
image that is being provided, such as the installed operating system and version. By default, the additional information
143+
is gathered automatically by the Image Tool using `docker run`. If it is desirable to provide that additional information
144+
manually and avoid the `docker run` step, `--fromImageProperties` must be provided with the additional information using
145+
a Java Properties file. The file must be a line-oriented format with key-value pairs separated by `=`. For example:
146+
```properties
147+
packageManager=MICRODNF
148+
__OS__ID="ol"
149+
__OS__VERSION="8.10"
150+
```
151+
Required properties:
152+
153+
| Key | Description | Default |
154+
| --- | --- | --- |
155+
| `packageManager` | The name of the installed package manager in the `fromImage` in all CAPS. Like `DNF`, `MICRODNF`, and `YUM` | `YUM` |
156+
| `__OS__ID` | The ID value found in `/etc/os-release`. Like "ol" for Oracle Linux, or "bb" for BusyBox. | |
157+
| `__OS__VERSION` | The VERSION value found in `/etc/os-release`. Like "8.10". | |
158+
159+
Additional properties:
160+
161+
| Key | Description |
162+
| --- | --- |
163+
| `javaHome` | The location where the JDK is pre-installed. Like "/u01/jdk". |
164+
| `__OS__arch` | The output of `uname -m`. Like `amd64` or `arm64`. |
165+
166+
134167
#### Resource Template Files
135168

136169
If provided, the file or files provided with `--resourceTemplates` will be overwritten. For known tokens,
@@ -172,8 +205,6 @@ $ imagetool @/path/to/build_args
172205

173206
### Usage scenarios
174207

175-
**Note**: Use `--passwordEnv` or `--passwordFile` instead of `--password`.
176-
177208
The following commands assume that all the required JDK, WLS, or FMW (WebLogic infrastructure) installers have been downloaded
178209
to the cache directory. Use the [cache]({{< relref "/userguide/tools/cache.md" >}}) command to set it up.
179210

0 commit comments

Comments
 (0)