diff --git a/10.0/docker-entrypoint.sh b/10.0/docker-entrypoint.sh index 19b40b7a..ea8b9538 100755 --- a/10.0/docker-entrypoint.sh +++ b/10.0/docker-entrypoint.sh @@ -80,9 +80,10 @@ if [ "$1" = 'mysqld' ]; then echo for f in /docker-entrypoint-initdb.d/*; do case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; - *) echo "$0: ignoring $f" ;; + *.sh) echo "$0: running $f"; . "$f" ;; + *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; + *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysql[@]}" && echo ;; + *) echo "$0: ignoring $f" ;; esac echo done diff --git a/5.5/docker-entrypoint.sh b/5.5/docker-entrypoint.sh index 19b40b7a..ea8b9538 100755 --- a/5.5/docker-entrypoint.sh +++ b/5.5/docker-entrypoint.sh @@ -80,9 +80,10 @@ if [ "$1" = 'mysqld' ]; then echo for f in /docker-entrypoint-initdb.d/*; do case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; - *) echo "$0: ignoring $f" ;; + *.sh) echo "$0: running $f"; . "$f" ;; + *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; + *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysql[@]}" && echo ;; + *) echo "$0: ignoring $f" ;; esac echo done diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 19b40b7a..ea8b9538 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -80,9 +80,10 @@ if [ "$1" = 'mysqld' ]; then echo for f in /docker-entrypoint-initdb.d/*; do case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; - *) echo "$0: ignoring $f" ;; + *.sh) echo "$0: running $f"; . "$f" ;; + *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f" && echo ;; + *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysql[@]}" && echo ;; + *) echo "$0: ignoring $f" ;; esac echo done