@@ -13,7 +13,6 @@ Builds a Docker Image for Oracle Database.
1313
1414Parameters:
1515 -v: version to build
16- Choose one of: $( for i in $( ls -d * /) ; do echo -n " ${i%%/ } " ; done)
1716 Choose "latest" version for podman host machines
1817 Choose "ol7" version for docker host machines
1918 -o: passes on Docker build option
3433
3534# Parameters
3635VERSION=" latest"
37- SKIPMD5=0
36+ export SKIPMD5=0
3837DOCKEROPS=" "
3938
4039while getopts " hiv:o:" optname; do
7069 exit 1
7170fi
7271# Go into version folder
73- cd $VERSION
72+ cd " $VERSION " || exit
7473
7574echo " =========================="
7675echo " DOCKER info:"
@@ -79,22 +78,23 @@ echo "=========================="
7978
8079# Proxy settings
8180PROXY_SETTINGS=" "
81+ # shellcheck disable=SC2154
8282if [ " ${http_proxy} " != " " ]; then
8383 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg http_proxy=${http_proxy} "
8484fi
85-
85+ # shellcheck disable=SC2154
8686if [ " ${https_proxy} " != " " ]; then
8787 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg https_proxy=${https_proxy} "
8888fi
89-
89+ # shellcheck disable=SC2154
9090if [ " ${ftp_proxy} " != " " ]; then
9191 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy} "
9292fi
93-
93+ # shellcheck disable=SC2154
9494if [ " ${no_proxy} " != " " ]; then
9595 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg no_proxy=${no_proxy} "
9696fi
97-
97+ # shellcheck disable=SC2154
9898if [ " $PROXY_SETTINGS " != " " ]; then
9999 echo " Proxy settings were found and will be used during the build."
100100fi
@@ -106,15 +106,17 @@ echo "Building image '$IMAGE_NAME' ..."
106106
107107# BUILD THE IMAGE (replace all environment variables)
108108BUILD_START=$( date ' +%s' )
109+ # shellcheck disable=SC2086
109110$CONTAINER_BUILD_TOOL build --force-rm=true --no-cache=true $DOCKEROPS $PROXY_SETTINGS -t $IMAGE_NAME -f Containerfile . || {
110111 echo " There was an error building the image."
111112 exit 1
112113}
113114BUILD_END=$( date ' +%s' )
114- BUILD_ELAPSED=` expr $BUILD_END - $BUILD_START `
115+ # shellcheck disable=SC2154,SC2003
116+ BUILD_ELAPSED=$(( BUILD_END - BUILD_START))
115117
116118echo " "
117-
119+ # shellcheck disable=SC2181,SC2320
118120if [ $? -eq 0 ]; then
119121cat << EOF
120122 Oracle RAC Storage Server Container Image version $VERSION is ready to be extended:
127129
128130else
129131 echo " Oracle RAC Storage Server Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation."
130- fi
131-
132+ fi
0 commit comments