@@ -152,6 +152,7 @@ function initialize {
152
152
# Function to get the dependency docker sample
153
153
#
154
154
function getDockerSample {
155
+ rm -rf ${scriptDir} /docker-images
155
156
git clone https://github.com/oracle/docker-images.git
156
157
}
157
158
@@ -257,23 +258,26 @@ function createDomainHome {
257
258
258
259
dockerDir=${scriptDir} /docker-images/OracleWebLogic/samples/${imagePath}
259
260
dockerPropsDir=${dockerDir} /properties
260
- cp ${domainPropertiesOutput} ${dockerPropsDir}
261
+
261
262
262
263
# 12213-domain-home-in-image use one properties file for the credentials
263
- usernameFile=" ${dockerPropsDir} /docker_build/domain_security.properties"
264
- passwordFile=" ${dockerPropsDir} /docker_build/domain_security.properties"
264
+ dockerBuildDir=docker_build
265
+ usernameFile=" ${dockerPropsDir} /${dockerBuildDir} /domain_security.properties"
266
+ passwordFile=" ${dockerPropsDir} /${dockerBuildDir} /domain_security.properties"
265
267
266
268
# 12213-domain-home-in-image-wdt uses two properties files for the credentials
267
269
if [ ! -f $usernameFile ]; then
268
- usernameFile=" ${dockerPropsDir} /docker-build/adminuser.properties"
269
- passwordFile=" ${dockerPropsDir} /docker-build/adminpass.properties"
270
+ dockerBuildDir=docker-build
271
+ usernameFile=" ${dockerPropsDir} /${dockerBuildDir} /adminuser.properties"
272
+ passwordFile=" ${dockerPropsDir} /${dockerBuildDir} /adminpass.properties"
270
273
fi
274
+ cp ${domainPropertiesOutput} ${dockerPropsDir} /${dockerBuildDir}
271
275
272
276
sed -i -e " s|myuser|${username} |g" $usernameFile
273
277
sed -i -e " s|mypassword1|${password} |g" $passwordFile
274
278
275
279
if [ ! -z $baseImage ]; then
276
- sed -i -e " s|\(FROM \).*|\1 ${baseImage} |g" Dockerfile
280
+ sed -i -e " s|\(FROM \).*|\1 ${baseImage} |g" ${dockerDir} / Dockerfile
277
281
fi
278
282
279
283
sh ${dockerDir} /build.sh
0 commit comments