Skip to content

Commit

Permalink
Handle Empty initdb.d directory
Browse files Browse the repository at this point in the history
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/*
```
  • Loading branch information
apeschel committed Aug 17, 2016
1 parent 77f0a50 commit dbb83a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions 5.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -eo pipefail
shopt -s nullglob

# if command starts with an option, prepend mysqld
if [ "${1:0:1}" = '-' ]; then
Expand Down
1 change: 1 addition & 0 deletions 5.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -eo pipefail
shopt -s nullglob

# if command starts with an option, prepend mysqld
if [ "${1:0:1}" = '-' ]; then
Expand Down
1 change: 1 addition & 0 deletions 5.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -eo pipefail
shopt -s nullglob

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

0 comments on commit dbb83a9

Please sign in to comment.