Skip to content

Commit 1a9dba7

Browse files
committed
Feature: adding hook to execute additional scripts on startup
1 parent c80d686 commit 1a9dba7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

5.6/docker-entrypoint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ if [ ! -d '/var/lib/mysql/mysql' -a "${1%_safe}" = 'mysqld' ]; then
3333
fi
3434
fi
3535

36+
INIT_DIR='/docker-entrypoint-initdb.d'
37+
for f in $INIT_DIR/*.sql
38+
do
39+
echo "Appending sql script: $f"
40+
cat $f >> "$TEMP_FILE"
41+
done
42+
3643
echo 'FLUSH PRIVILEGES ;' >> "$TEMP_FILE"
3744

3845
set -- "$@" --init-file="$TEMP_FILE"

0 commit comments

Comments
 (0)