Archived
1
0
Fork 0

Install sail

This commit is contained in:
Henrik Hautakoski 2026-02-25 13:51:11 +01:00
parent 83963cce66
commit f561332507
3 changed files with 67 additions and 0 deletions

View 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

View 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