add: mariadb

This commit is contained in:
starnakin 2023-10-05 12:14:12 -04:00
parent 71dc294248
commit ed3195f536
2 changed files with 12 additions and 0 deletions

10
srcs/mariadb/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:3.17
RUN apk update
RUN apk add mariadb
RUN mariadb-install-db
RUN mkdir /run/mysqld
COPY init.sql /etc
ENTRYPOINT ["mariadbd", "--no-defaults", "--user=root", "--datadir=/data", "--init-file=/etc/init.sql"]

2
srcs/mariadb/init.sql Normal file
View File

@ -0,0 +1,2 @@
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'%' IDENTIFIED BY 'wordpress';