Skip to content

Commit dbb83a9

Browse files
committed
Handle Empty initdb.d directory
The docker-entrypoint.sh script does not currently handle the case where the docker-entrypoint-initdb.d directory is empty. This commit sets the nullglob shell option to cause the empty directory to glob to nothing. This change will fix the following confusing message from coming up during startup. ``` /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* ```
1 parent 77f0a50 commit dbb83a9

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

5.5/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set -eo pipefail
3+
shopt -s nullglob
34

45
# if command starts with an option, prepend mysqld
56
if [ "${1:0:1}" = '-' ]; then

5.6/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set -eo pipefail
3+
shopt -s nullglob
34

45
# if command starts with an option, prepend mysqld
56
if [ "${1:0:1}" = '-' ]; then

5.7/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set -eo pipefail
3+
shopt -s nullglob
34

45
# if command starts with an option, prepend mysqld
56
if [ "${1:0:1}" = '-' ]; then

0 commit comments

Comments
 (0)