Unraid compatible single container docker image (#390)

See https://github.com/gaseous-project/unraid-template for an Unraid XML
template.
This commit is contained in:
Michael Green
2024-07-12 15:43:02 +10:00
committed by GitHub
parent 6d7f6f63c6
commit 3366d926f4
5 changed files with 39 additions and 16 deletions

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# install the database
/usr/bin/mariadb-install-db --datadir=/var/lib/mysql --user=gaseous
# start the database server without network or grant tables
/usr/sbin/mariadbd --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &
@@ -7,7 +10,7 @@
sleep 5
# change the root password
mariadb -u root -e "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; FLUSH PRIVILEGES;"
mariadb -u root -e "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; ALTER USER 'gaseous'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; FLUSH PRIVILEGES; SHUTDOWN;"
# stop the server
sleep 5