Skip to content

Commit fb854eb

Browse files
committed
Fix linter issues
1 parent 4697ec7 commit fb854eb

23 files changed

+52
-20
lines changed

OracleDatabase/SingleInstance/dockerfiles/11.2.0.2/Dockerfile.xe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ RUN yum -y install unzip libaio bc initscripts net-tools openssl compat-libstdc+
9090
HEALTHCHECK --interval=1m --start-period=5m \
9191
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
9292

93-
CMD exec $ORACLE_BASE/$RUN_FILE
93+
CMD [ "/bin/bash", "-c", "exec $ORACLE_BASE/$RUN_FILE" ]

OracleDatabase/SingleInstance/dockerfiles/11.2.0.2/checkDBStatus.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if [ "$IGNORE_DB_STARTED_MARKER" != true ] && [ ! -f "$DB_STARTED_MARKER_FILE" ]
1818
fi
1919

2020
POSITIVE_RETURN="OPEN"
21+
# shellcheck disable=SC2034
2122
ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
2223

2324
# Check Oracle DB status and store it in status

OracleDatabase/SingleInstance/dockerfiles/11.2.0.2/runOracle.sh

100644100755
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ function runUserScripts {
1919

2020
for f in $SCRIPTS_ROOT/*; do
2121
case "$f" in
22-
*.sh) echo "$0: running $f"; . "$f" ;;
22+
*.sh)
23+
echo "$0: running $f"
24+
# shellcheck disable=SC1090
25+
. "$f"
26+
;;
2327
*.sql) echo "$0: running $f"; echo "exit" | su -p oracle -c "$ORACLE_HOME/bin/sqlplus / as sysdba @$f"; echo ;;
2428
*) echo "$0: ignoring $f" ;;
2529
esac
@@ -175,7 +179,7 @@ fi;
175179
/etc/init.d/oracle-xe start | grep -qc "Oracle Database 11g Express Edition is not configured"
176180
if [ "$?" == "0" ]; then
177181
# Check whether container has enough memory
178-
if [ `df -Pk /dev/shm | tail -n 1 | awk '{print $2}'` -lt 1048576 ]; then
182+
if [ "`df -Pk /dev/shm | tail -n 1 | awk '{print $2}'`" -lt 1048576 ]; then
179183
echo "Error: The container doesn't have enough memory allocated."
180184
echo "A database XE container needs at least 1 GB of shared memory (/dev/shm)."
181185
echo "You currently only have $((`df -Pk /dev/shm | tail -n 1 | awk '{print $2}'`/1024)) MB allocated to the container."

OracleDatabase/SingleInstance/dockerfiles/12.1.0.2/Dockerfile.ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ HEALTHCHECK --interval=1m --start-period=5m \
120120
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
121121

122122
# Define default command to start Oracle Database.
123-
CMD exec $ORACLE_BASE/$RUN_FILE
123+
CMD [ "/bin/bash", "-c", "exec $ORACLE_BASE/$RUN_FILE" ]

OracleDatabase/SingleInstance/dockerfiles/12.1.0.2/Dockerfile.se2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ HEALTHCHECK --interval=1m --start-period=5m \
120120
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
121121

122122
# Define default command to start Oracle Database.
123-
CMD exec $ORACLE_BASE/$RUN_FILE
123+
CMD [ "/bin/bash", "-c", "exec $ORACLE_BASE/$RUN_FILE" ]

OracleDatabase/SingleInstance/dockerfiles/12.1.0.2/checkDBStatus.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ if [ "$IGNORE_DB_STARTED_MARKER" != true ] && [ ! -f "$DB_STARTED_MARKER_FILE" ]
1717
exit 1
1818
fi
1919

20+
# shellcheck disable=SC2034
2021
ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
2122
OPEN_MODE="READ WRITE"
23+
# shellcheck disable=SC2034
2224
ORAENV_ASK=NO
25+
# shellcheck disable=SC1090
2326
source oraenv
2427

2528
# Check Oracle at least one PDB has open_mode "READ WRITE" and store it in status

OracleDatabase/SingleInstance/dockerfiles/12.2.0.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ HEALTHCHECK --interval=1m --start-period=5m \
117117
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
118118

119119
# Define default command to start Oracle Database.
120-
CMD exec $ORACLE_BASE/$RUN_FILE
120+
CMD [ "/bin/bash", "-c", "exec $ORACLE_BASE/$RUN_FILE" ]

OracleDatabase/SingleInstance/dockerfiles/12.2.0.1/checkDBStatus.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ if [ "$IGNORE_DB_STARTED_MARKER" != true ] && [ ! -f "$DB_STARTED_MARKER_FILE" ]
1717
exit 1
1818
fi
1919

20+
# shellcheck disable=SC2034
2021
ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
2122
OPEN_MODE="READ WRITE"
23+
# shellcheck disable=SC2034
2224
ORAENV_ASK=NO
25+
# shellcheck disable=SC1090
2326
source oraenv
2427

2528
# Check Oracle at least one PDB has open_mode "READ WRITE" and store it in status

OracleDatabase/SingleInstance/dockerfiles/18.3.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ HEALTHCHECK --interval=1m --start-period=5m \
117117
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
118118

119119
# Define default command to start Oracle Database.
120-
CMD exec $ORACLE_BASE/$RUN_FILE
120+
CMD [ "/bin/bash", "-c", "exec $ORACLE_BASE/$RUN_FILE" ]

OracleDatabase/SingleInstance/dockerfiles/18.3.0/checkDBStatus.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ if [ "$IGNORE_DB_STARTED_MARKER" != true ] && [ ! -f "$DB_STARTED_MARKER_FILE" ]
1717
exit 1
1818
fi
1919

20+
# shellcheck disable=SC2034
2021
ORACLE_SID="`grep $ORACLE_HOME /etc/oratab | cut -d: -f1`"
2122
OPEN_MODE="READ WRITE"
23+
# shellcheck disable=SC2034
2224
ORAENV_ASK=NO
25+
# shellcheck disable=SC1090
2326
source oraenv
2427

2528
# Check Oracle at least one PDB has open_mode "READ WRITE" and store it in status

0 commit comments

Comments
 (0)