Added mariadb
This commit is contained in:
13
mariadb-srv/Dockerfile
Normal file
13
mariadb-srv/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM debian:bookworm
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y; apt-get install mariadb-server mariadb-client -y
|
||||
|
||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||
COPY project/entrypoint/fix_volumes.sh /entrypoint/fix_volumes.sh
|
||||
#COPY project/entrypoint/gen-cert.sh /entrypoint/gen-cert.sh
|
||||
RUN mkdir -p /tmp/buildtime/etc/mysql && cp -r /etc/mysql/. /tmp/buildtime/etc/mysql/
|
||||
RUN mkdir -p /tmp/buildtime/var/lib/mysql && cp -r /var/lib/mysql/. /tmp/buildtime/var/lib/mysql/
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]
|
||||
10
mariadb-srv/project/entrypoint/entrypoint.sh
Normal file
10
mariadb-srv/project/entrypoint/entrypoint.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
/bin/sh /entrypoint/fix_volumes.sh
|
||||
|
||||
service mariadb start
|
||||
# Run the CMD that was passed (or default)
|
||||
#exec "$@"
|
||||
|
||||
tail -f /dev/null
|
||||
|
||||
9
mariadb-srv/project/entrypoint/fix_volumes.sh
Normal file
9
mariadb-srv/project/entrypoint/fix_volumes.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /etc/mysql # Creates /etc/php if it doesn't exist
|
||||
mkdir -p /var/lib/mysql # Creates /etc/php if it doesn't exist
|
||||
|
||||
mv /tmp/buildtime/etc/mysql/* /etc/mysql/
|
||||
mv /tmp/buildtime/var/lib/mysql/* /var/lib/mysql
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
chown -R mysql:root /run/mysqld
|
||||
Reference in New Issue
Block a user