File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
java/com/oracle/weblogic/imagetool/util
test/java/com/oracle/weblogic/imagetool/util Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -534,6 +534,19 @@ public boolean isWdtEnabled() {
534534 return useWdt ;
535535 }
536536
537+ /**
538+ * Referenced by the Dockerfile template to determine which command to use to install WDT.
539+ *
540+ * @return true if the WDT installer file is a tar.gz file; false otherwise.
541+ */
542+ public boolean usingWdtTarGzInstaller () {
543+ boolean result = false ;
544+ if (wdtInstallerFilename != null && wdtInstallerFilename .toLowerCase ().endsWith (".tar.gz" )) {
545+ result = true ;
546+ }
547+ return result ;
548+ }
549+
537550 /**
538551 * copyOraInst check if it needs to copy the oraInst.loc file.
539552 *
@@ -773,8 +786,9 @@ public String wdtInstaller() {
773786 return wdtInstallerFilename ;
774787 }
775788
776- public void setWdtInstallerFilename (String value ) {
789+ public DockerfileOptions setWdtInstallerFilename (String value ) {
777790 wdtInstallerFilename = value ;
791+ return this ;
778792 }
779793
780794 public boolean modelOnly () {
Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ RUN echo "INSTALLING MIDDLEWARE" \
115115 { {{.} }}
116116 { {/beforeWdtCommand} }
117117
118- RUN unzip -q { {{tempDir} }}/{ {{wdtInstaller} }} -d { {{wdt_home} }}
118+ { {#usingWdtTarGzInstaller} }
119+ RUN tar zxf { {{tempDir} }}/{ {{wdtInstaller} }} -C { {{wdt_home} }}
120+ { {/usingWdtTarGzInstaller} }
121+ { {^usingWdtTarGzInstaller} }
122+ RUN unzip -q { {{tempDir} }}/{ {{wdtInstaller} }} -d { {{wdt_home} }}
123+ { {/usingWdtTarGzInstaller} }
124+
119125 { {^modelOnly} }
120126 RUN cd { {{wdt_home} }}/weblogic-deploy/bin \
121127 && { {#isWdtUseEncryption} }echo { {{wdtEncryptionKey} }} | { {/isWdtUseEncryption} } ./createDomain.sh \
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ void validateMustacheAliases() throws IOException {
3737 .setWdtDomainType ("WLS" )
3838 .setWdtModels (Arrays .asList ("model1.yaml" , "model2.yaml" ))
3939 .setPackageInstaller (PackageManagerType .YUM )
40+ .setWdtInstallerFilename ("weblogic-deploy.zip" )
4041 .setMiddlewareInstall (install );
4142
4243 MustacheFactory mf = new DefaultMustacheFactory (new File ("src/main/resources/docker-files" ));
You can’t perform that action at this time.
0 commit comments