@@ -11,7 +11,6 @@ It builds a patched RAC container image
1111
1212Parameters:
1313 -v: version to build
14- Choose one of: $( for i in $( ls -d * /) ; do echo -n " ${i%%/ } " ; done)
1514 -o: passes on container build option
1615 -p: patch label to be used for the tag
1716
@@ -32,8 +31,11 @@ if [ "$#" -eq 0 ]; then
3231fi
3332
3433# Parameters
34+ # shellcheck disable=SC2034
3535ENTERPRISE=0
36+ # shellcheck disable=SC2034
3637STANDARD=0
38+ # shellcheck disable=SC2034
3739LATEST=" latest"
3840VERSION=' x'
3941PATCHLABEL=" patch"
6870IMAGE_NAME=" oracle/database-rac:$VERSION -$PATCHLABEL "
6971
7072# Go into version folder
73+ # shellcheck disable=SC2164
7174cd latest
7275
7376# Proxy settings
7477PROXY_SETTINGS=" "
78+ # shellcheck disable=SC2154
7579if [ " ${http_proxy} " != " " ]; then
7680 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg http_proxy=${http_proxy} "
7781fi
78-
82+ # shellcheck disable=SC2154
7983if [ " ${https_proxy} " != " " ]; then
8084 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg https_proxy=${https_proxy} "
8185fi
82-
86+ # shellcheck disable=SC2154
8387if [ " ${ftp_proxy} " != " " ]; then
8488 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy} "
8589fi
86-
90+ # shellcheck disable=SC2154
8791if [ " ${no_proxy} " != " " ]; then
8892 PROXY_SETTINGS=" $PROXY_SETTINGS --build-arg no_proxy=${no_proxy} "
8993fi
90-
94+ # shellcheck disable=SC2154
9195if [ " $PROXY_SETTINGS " != " " ]; then
9296 echo " Proxy settings were found and will be used during the build."
9397fi
@@ -100,22 +104,22 @@ echo "Building image '$IMAGE_NAME' ..."
100104# BUILD THE IMAGE (replace all environment variables)
101105BUILD_START=$( date ' +%s' )
102106docker build --no-cache=true $DOCKEROPS $PROXY_SETTINGS -t env -f ContainerfileEnv .
103-
104- docker cp $( docker create --name env --rm env) :/tmp/.env ./
105-
107+ # shellcheck disable=SC2046
108+ docker cp $( docker create --name env-070125 --rm env) :/tmp/.env ./
109+ # shellcheck disable=SC2046
106110docker build --no-cache=true $DOCKEROPS \
107111 --build-arg GRID_HOME=$( grep GRID_HOME .env | cut -d ' =' -f2) \
108112 --build-arg DB_HOME=$( grep DB_HOME .env | cut -d ' =' -f2) $PROXY_SETTINGS -t $IMAGE_NAME -f Containerfile . || {
109113 echo " There was an error building the image."
110114 exit 1
111115}
112- docker rmi -f env
116+ docker rmi -f env-070125
113117
114118BUILD_END=$( date ' +%s' )
115119BUILD_ELAPSED=` expr $BUILD_END - $BUILD_START `
116120
117121echo " "
118-
122+ # shellcheck disable=SC2320
119123if [ $? -eq 0 ]; then
120124cat << EOF
121125 Oracle Database container image for Real Application Clusters (RAC) version $VERSION is ready to be extended:
0 commit comments