Init project

Co-authored-by: Clément Reniers <VirisOnGithub@users.noreply.github.com>
This commit is contained in:
2025-06-03 15:13:55 +02:00
commit ba794404ef
66 changed files with 13647 additions and 0 deletions

18
images/SQL_Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM mariadb:latest AS builder
COPY db_init.sql /docker-entrypoint-initdb.d/
# That file does the DB initialization but also runs mysql daemon, by removing the last line it will only init
RUN ["sed", "-i", "s/exec \"$@\"/echo \"not running $@\"/", "/usr/local/bin/docker-entrypoint.sh"]
ENV MARIADB_USER=root
ENV MARIADB_ROOT_PASSWORD=super_strong_password
# Need to change the datadir to something else that /var/lib/mysql because the parent docker file defines it as a volume.
# https://docs.docker.com/engine/reference/builder/#volume :
# Changing the volume from within the Dockerfile: If any build steps change the data within the volume after
# it has been declared, those changes will be discarded.
RUN ["/usr/local/bin/docker-entrypoint.sh", "mariadbd", "--datadir", "/initialized-db", "--aria-log-dir-path", "/initialized-db"]
FROM mariadb:latest
COPY --from=builder /initialized-db /var/lib/mysql