Skip to content

Commit 2a62b96

Browse files
committed
Derive the clone location from domainHomeImageBuildPath
Signed-off-by: doxiao <[email protected]>
1 parent 60d7eed commit 2a62b96

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The script will perform the following steps:
4040

4141
* Create a directory for the generated properties and Kubernetes YAML files for this domain if it does not already exist. The pathname is `/path/to/weblogic-operator-output-directory/weblogic-domains/<domainUID>`. If the directory already exists, its contents will be removed.
4242
* Create a properties file, `domain.properties`, in the directory that is created above. This properties file will be used to create a sample WebLogic Server domain.
43-
* Clone the WebLogic docker-images project into the current directory using `git clone https://github.com/oracle/docker-images.git`.
43+
* Clone the WebLogic docker-images project into the current directory using `git clone https://github.com/oracle/docker-images.git`. Note, by default, the script always cleans up the project and clones it again on every run. You need to specify the `-k` option if you want to use a previously cloned project.
4444
* Replace the built-in user name and password in the `properties/docker-build/domain_security.properties` file with the `username` and `password` that are supplied on the command line using the `-u` and `-p` options. These credentials need to match the WebLogic domain admin credentials in the secret that is specified via the `weblogicCredentialsSecretName` property in the `create-domain-inputs.yaml` file.
4545
* Build a Docker image based on the Docker sample, [Example Image with a WebLogic Server Domain using the Oracle WebLogic Scripting Tooling (WLST)](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-home-in-image) or [Example Image with a WebLogic Server Domain using the Oracle WebLogic Deploy Tooling (WDT)](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-home-in-image-wdt). It will create a sample WebLogic Server domain in the Docker image. **Note**: Oracle recommends keeping the domain home image private in the local repository.
4646
* Create a tag that refers to the generated Docker image.

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function initialize {
155155

156156
initOutputDir
157157

158-
if [ "${cloneIt}" = true ]; then
158+
if [ "${cloneIt}" = true ] || [ ! -d $domainHomeImageBuildPath} ]; then
159159
getDockerSample
160160
fi
161161
}
@@ -164,8 +164,9 @@ function initialize {
164164
# Function to get the dependency docker sample
165165
#
166166
function getDockerSample {
167-
rm -rf ${scriptDir}/docker-images
168-
git clone https://github.com/oracle/docker-images.git ${scriptDir}/docker-images
167+
dockerImagesDir=${domainHomeImageBuildPath%/OracleWebLogic*}
168+
rm -rf ${dockerImagesDir}
169+
git clone https://github.com/oracle/docker-images.git ${dockerImagesDir}
169170
}
170171

171172
#

0 commit comments

Comments
 (0)