Skip to content

Commit

Permalink
Merge pull request docker-library#126 from silentroach/feature/suppor…
Browse files Browse the repository at this point in the history
…t-sql-gz

Support for sql.gz dump restore
  • Loading branch information
ltangvald committed Jan 13, 2016
2 parents a1a948c + cf1bf4f commit 2e80e5f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions 5.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,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
Expand Down
7 changes: 4 additions & 3 deletions 5.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,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
Expand Down
7 changes: 4 additions & 3 deletions 5.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,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
Expand Down

0 comments on commit 2e80e5f

Please sign in to comment.