The create
command helps build a WebLogic Docker image from a given base OS image. The required option for the command is marked. There are a number of optional parameters for the create feature.
Usage: imagetool create [OPTIONS]
Parameter | Definition | Default |
---|---|---|
--additionalBuildCommands |
Path to a file with additional build commands. For more details, see Additional information. | |
--additionalBuildFiles |
Additional files that are required by your additionalBuildCommands . A comma separated list of files that should be copied to the build context. |
|
--buildNetwork |
Networking mode for the RUN instructions during the image build. See --network for Docker build . |
|
--chown |
userid:groupid for JDK/Middleware installs and patches. |
oracle:oracle |
--docker |
Path to the Docker executable. | docker |
--dryRun |
Skip Docker build execution and print the Dockerfile to stdout. | |
--fromImage |
Docker image to use as a base image when creating a new image. | oraclelinux:7-slim |
--httpProxyUrl |
Proxy for the HTTP protocol. Example: http://myproxy:80 or http:user:passwd@myproxy:8080 |
|
--httpsProxyUrl |
Proxy for the HTTPS protocol. Example: https://myproxy:80 or https:user:passwd@myproxy:8080 |
|
--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. | |
--inventoryPointerFile |
Path to custom inventory pointer file. | |
--inventoryPointerInstallLoc |
Target location for the inventory pointer file. | |
--jdkVersion |
Version of the server JDK to install. | 8u202 |
--latestPSU |
Find and apply the latest PatchSet Update. | |
--opatchBugNumber |
The patch number for OPatch (patching OPatch). | |
--password |
Request password for the Oracle Support --user on STDIN, see --user . |
|
--passwordEnv |
Environment variable containing the Oracle Support password, see --user . |
|
--passwordFile |
Path to a file containing just the Oracle Support password, see --user . |
|
--patches |
Comma separated list of patch IDs. Example: 12345678,87654321 |
|
--pull |
Always attempt to pull a newer version of base images during the build. | |
--tag |
(Required) Tag for the final build image. Example: store/oracle/weblogic:12.2.1.3.0 |
|
--type |
Installer type. Supported values: WLS , FMW , IDM , OSB , OUD_WLS , SOA_OSB , WCP , OAM , OIG , OUD , SOA , WCC , WCS , WCP |
WLS |
--user |
Oracle support email ID. | |
--version |
Installer version. | 12.2.1.3.0 |
--wdtArchive |
Path to the WDT archive file used by the WDT model. | |
--wdtDomainHome |
Path to the -domain_home for WDT. |
|
--wdtDomainType |
WDT domain type. Supported values: WLS , JRF , RestrictedJRF |
WLS |
--wdtEncryptionKey |
Passphrase for WDT -use_encryption that will be requested on STDIN. | |
--wdtEncryptionKeyEnv |
Passphrase for WDT -use_encryption that is provided as an environment variable. | |
--wdtEncryptionKeyFile |
Passphrase for WDT -use_encryption that is provided as a file. | |
--wdtJavaOptions |
Java command-line options for WDT. | |
--wdtModel |
Path to the WDT model file that defines the domain to create. | |
--wdtModelOnly |
Install WDT and copy the models to the image, but do not create the domain. | false |
--wdtRunRCU |
Instruct WDT to run RCU when creating the domain. | |
--wdtStrictValidation |
Use strict validation for the WDT validation method. Only applies when using model only. | false |
--wdtVariables |
Path to the WDT variables file for use with the WDT model. | |
--wdtVersion |
WDT tool version to use. |
This is an advanced option that let's you provide additional commands to the Docker build step.
The input for this parameter is a simple text file that contains one or more of the valid sections: before-jdk-install
, after-jdk-install
, before-fmw-install
, after-fmw-install
, before-wdt-command
, after-wdt-command
, final-build-commands
.
Each section can contain one or more valid Dockerfile commands and would look like the following:
[after-fmw-install]
RUN rm /some/dir/unnecessary-file
COPY --chown=oracle:oracle files/my_additional_file.txt /u01
[final-build-commands]
LABEL owner="middleware team"
This option provides a way to supply additional files to the image build command.
All provided files and directories are copied directly under the files
subfolder of the build context.
To get those files into the image, additional build commands must be provided using the additionalBuildCommands
options.
Access to these files using a build command, such as COPY
or ADD
, should use the original filename
with the folder prefix, files/
. For example, if the
original file was provided as --additionalBuildFiles /scratch/test1/convenience.sh
, the Docker build command COPY
provided in --additionalBuildCommands
should look like
COPY --chown=oracle:oracle files/convenience.sh /my/internal/image/location
.
Because Image Tool uses multi-stage
builds, it is important to place the build command (like COPY
) in the appropriate section of the Dockerfile
based
on when the build needs access to the file. For example, if the file is needed in the final image and not for
installation or domain creation steps, use the final-build-commands
section so that the COPY
command occurs in the
final stage of the image build. Or, if the file needs to change the Oracle Home prior to domain creation, use
the after-fmw-install
or before-wdt-command
sections.
You can save all arguments passed for the Image Tool in a file, then use the file as a parameter.
For example, create a file called build_args
:
create
--type wls
--version 12.2.1.3.0
--tag wls:122130
--user acmeuser@mycompany.com
--httpProxyUrl http://mycompany-proxy:80
--httpsProxyUrl http://mycompany-proxy:80
--passwordEnv MYPWD
Use it on the command line, as follows:
imagetool @/path/to/build_args
Note: Use --passwordEnv
or --passwordFile
instead of --password
.
The commands below assume that all the required JDK, WLS, or FMW (WebLogic infrastructure installers) have been downloaded to the cache directory. Use the cache command to set it up.
-
Create an image named
sample:wls
with the WebLogic installer 12.2.1.3.0, server JDK 8u202, and latest PSU applied.imagetool create --tag sample:wls --latestPSU --user testuser@xyz.com --password hello
-
Create an image named
sample:wdt
with the same options as above and create a domain with WebLogic Deploy Tooling.imagetool create --tag sample:wdt --latestPSU --user testuser@xyz.com --password hello --wdtModel /path/to/model.json --wdtVariables /path/to/variables.json --wdtVersion 0.16
If
wdtVersion
is not provided, the tool uses the latest release. -
Create an image named
sample:patch
with the selected patches applied.imagetool create --tag sample:patch --user testuser@xyz.com --password hello --patches 12345678,p87654321
The patch numbers may or may not start with '
p
'.
Copyright (c) 2019, 2020, Oracle and/or its affiliates.