|
| 1 | +--- |
| 2 | +title: "Inspect Image" |
| 3 | +date: 2021-07-06T17:19:24-05:00 |
| 4 | +draft: false |
| 5 | +weight: 1 |
| 6 | +description: "The inspect command reports on the contents of a Docker image." |
| 7 | +--- |
| 8 | + |
| 9 | +The `inspect` command reports on the contents of a Docker image providing version and location information for Java |
| 10 | +and WebLogic installations. |
| 11 | + |
| 12 | +``` |
| 13 | +Usage: imagetool inspect [OPTIONS] |
| 14 | +``` |
| 15 | + |
| 16 | +| Parameter | Definition | Default | |
| 17 | +| --- | --- | --- | |
| 18 | +| `--builder`, `-b` | Executable to process the Dockerfile. Use the full path of the executable if not on your path. | `docker` | |
| 19 | +| `--format` | The output format. Supported values: JSON | `JSON` | |
| 20 | +| `--image`. `-i` | (Required) The image ID or image name to be inspected. | | |
| 21 | +| `--patches` | Include OPatch information in the output, including a list of WebLogic patches that are applied. | | |
| 22 | + |
| 23 | +#### Use an argument file |
| 24 | + |
| 25 | +You can save all arguments passed for the Image Tool in a file, then use the file as a parameter. |
| 26 | + |
| 27 | +For example, create a file called `build_args`: |
| 28 | + |
| 29 | +```bash |
| 30 | +inspect |
| 31 | +--image wls:12.2.1.4.0 |
| 32 | +--patches |
| 33 | +``` |
| 34 | + |
| 35 | +Use the argument file on the command line, as follows: |
| 36 | + |
| 37 | +```bash |
| 38 | +$ imagetool @/path/to/build_args |
| 39 | +``` |
| 40 | + |
| 41 | +### Usage scenarios |
| 42 | + |
| 43 | +- Inspect an image created with the `create` command where the latest PSU was applied. |
| 44 | + ```bash |
| 45 | + $ imagetool.sh inspect --image example:12214 --patches |
| 46 | + ``` |
| 47 | + The output will be in JSON format and will be similar to: |
| 48 | + ```json |
| 49 | + { |
| 50 | + "oraclePatches" : [ |
| 51 | + { |
| 52 | + "patch" : "xxxxxxx", |
| 53 | + "description" : "WLS PATCH SET UPDATE 12.2.1.4.xxxxxxx" |
| 54 | + } |
| 55 | + ], |
| 56 | + "javaHome" : "/u01/jdk", |
| 57 | + "javaVersion" : "1.8.0_xxx", |
| 58 | + "opatchVersion" : "13.9.4.2.5", |
| 59 | + "oracleHome" : "/u01/oracle", |
| 60 | + "oracleHomeGroup" : "oracle", |
| 61 | + "oracleHomeUser" : "oracle", |
| 62 | + "oracleInstalledProducts" : "WLS,COH,TOPLINK", |
| 63 | + "packageManager" : "YUM", |
| 64 | + "wlsVersion" : "12.2.1.4.0" |
| 65 | + } |
| 66 | + ``` |
| 67 | + |
| 68 | +- Inspect the same image without the optional `--patches` switch. |
| 69 | + ```bash |
| 70 | + $ imagetool.sh inspect --image example:12214 |
| 71 | + ``` |
| 72 | + The output will be in JSON format and will be similar to: |
| 73 | + ```json |
| 74 | + { |
| 75 | + "javaHome" : "/u01/jdk", |
| 76 | + "javaVersion" : "1.8.0_xxx", |
| 77 | + "oracleHome" : "/u01/oracle", |
| 78 | + "oracleHomeGroup" : "oracle", |
| 79 | + "oracleHomeUser" : "oracle", |
| 80 | + "oracleInstalledProducts" : "WLS,COH,TOPLINK", |
| 81 | + "packageManager" : "YUM", |
| 82 | + "wlsVersion" : "12.2.1.4.0" |
| 83 | + } |
| 84 | + ``` |
0 commit comments