2020-11-14 01:38:56 +00:00
|
|
|
#!/bin/bash
|
2024-01-29 18:45:19 +00:00
|
|
|
set -e
|
2020-11-14 01:38:56 +00:00
|
|
|
|
|
|
|
# XXX: Workaround to avoid OverlayFS bug on MacOs
|
|
|
|
# https://docs.docker.com/storage/storagedriver/overlayfs-driver/#limitations-on-overlayfs-compatibility
|
|
|
|
|
2024-01-29 18:45:19 +00:00
|
|
|
if [ ! -d /var/lib/mysql/mysql ]; then
|
|
|
|
chown mysql:mysql /var/lib/mysql
|
|
|
|
cp -a /mysql-template/. /var/lib/mysql
|
2020-11-14 01:38:56 +00:00
|
|
|
fi
|
|
|
|
|
2024-01-29 18:45:19 +00:00
|
|
|
exec gosu mysql "$@"
|