add sail
This commit is contained in:
parent
4f104fe4f9
commit
aeecf0d395
5 changed files with 71 additions and 6 deletions
4
docker/mysql/Dockerfile
Normal file
4
docker/mysql/Dockerfile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
FROM mysql/mysql-server:8.0
|
||||
COPY create-testing-database.sh /docker-entrypoint-initdb.d/10-create-testing-database.sh
|
||||
RUN chmod +x /docker-entrypoint-initdb.d/10-create-testing-database.sh
|
||||
RUN chown -R mysql:mysql /docker-entrypoint-initdb.d
|
||||
6
docker/mysql/create-testing-database.sh
Normal file
6
docker/mysql/create-testing-database.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
|
||||
CREATE DATABASE IF NOT EXISTS testing;
|
||||
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
|
||||
EOSQL
|
||||
Loading…
Add table
Add a link
Reference in a new issue