first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
17
base/jimureport/1.6.0/docker-entrypoint.sh
Normal file
17
base/jimureport/1.6.0/docker-entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Waiting for database to start..."
|
||||
while ! mysqladmin ping -h "${MYSQL_HOST:-127.0.0.1}" -P "${MYSQL_PORT:-3306}" -u"${MYSQL_USERNAME:-root}" -p"${MYSQL_PASSWORD:-root}" --silent; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if ! mysql -h "${MYSQL_HOST:-127.0.0.1}" -P "${MYSQL_PORT:-3306}" -u"${MYSQL_USERNAME:-root}" -p"${MYSQL_PASSWORD:-root}" -D "${MYSQL_DB:-jimureport}" -e 'describe jimu_dict;' > /dev/null 2>&1; then
|
||||
echo "database does not exist, initializing..."
|
||||
mysql -h "${MYSQL_HOST:-127.0.0.1}" -P "${MYSQL_PORT:-3306}" -u"${MYSQL_USERNAME:-root}" -p"${MYSQL_PASSWORD:-root}" -D "${MYSQL_DB:-jimureport}" < /opt/jimureport/jimureport.mysql5.7.create.sql
|
||||
else
|
||||
echo "database have already initialized, skip..."
|
||||
fi
|
||||
|
||||
exec "$@"
|
Reference in New Issue
Block a user