Skip to content

Commit 90f7676

Browse files
committed
lint fixes
1 parent c3d719d commit 90f7676

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

OracleDatabase/RAC/OracleRealApplicationClusters/samples/applypatch/buildPatchedContainerImage.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ It builds a patched RAC container image
1111
1212
Parameters:
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
3231
fi
3332

3433
# Parameters
34+
# shellcheck disable=SC2034
3535
ENTERPRISE=0
36+
# shellcheck disable=SC2034
3637
STANDARD=0
38+
# shellcheck disable=SC2034
3739
LATEST="latest"
3840
VERSION='x'
3941
PATCHLABEL="patch"
@@ -68,26 +70,28 @@ done
6870
IMAGE_NAME="oracle/database-rac:$VERSION-$PATCHLABEL"
6971

7072
# Go into version folder
73+
# shellcheck disable=SC2164
7174
cd latest
7275

7376
# Proxy settings
7477
PROXY_SETTINGS=""
78+
# shellcheck disable=SC2154
7579
if [ "${http_proxy}" != "" ]; then
7680
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}"
7781
fi
78-
82+
# shellcheck disable=SC2154
7983
if [ "${https_proxy}" != "" ]; then
8084
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}"
8185
fi
82-
86+
# shellcheck disable=SC2154
8387
if [ "${ftp_proxy}" != "" ]; then
8488
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}"
8589
fi
86-
90+
# shellcheck disable=SC2154
8791
if [ "${no_proxy}" != "" ]; then
8892
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}"
8993
fi
90-
94+
# shellcheck disable=SC2154
9195
if [ "$PROXY_SETTINGS" != "" ]; then
9296
echo "Proxy settings were found and will be used during the build."
9397
fi
@@ -100,22 +104,22 @@ echo "Building image '$IMAGE_NAME' ..."
100104
# BUILD THE IMAGE (replace all environment variables)
101105
BUILD_START=$(date '+%s')
102106
docker 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
106110
docker 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

114118
BUILD_END=$(date '+%s')
115119
BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START`
116120

117121
echo ""
118-
122+
# shellcheck disable=SC2320
119123
if [ $? -eq 0 ]; then
120124
cat << EOF
121125
Oracle Database container image for Real Application Clusters (RAC) version $VERSION is ready to be extended:

OracleDatabase/RAC/OracleRealApplicationClusters/samples/applypatch/latest/Containerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ WORKDIR $WORKDIR
112112
HEALTHCHECK --interval=2m --start-period=30m \
113113
CMD "$SCRIPT_DIR/scripts/main.py --checkracinst=true" >/dev/null || exit 1
114114
#Fix SID detection
115+
# hadolint ignore=SC2086
115116
RUN $INVENTORY/orainstRoot.sh && \
116117
$GRID_HOME/root.sh && \
117118
$DB_HOME/root.sh

0 commit comments

Comments
 (0)