mirror of
https://github.com/Ladebeze66/Inception.git
synced 2026-02-04 03:30:46 +01:00
28 lines
865 B
Docker
28 lines
865 B
Docker
FROM debian:buster
|
|
|
|
# Installer les paquets nécessaires
|
|
RUN apt update -y && apt upgrade -y && \
|
|
apt-get install -y mariadb-server mariadb-client gettext-base procps && \
|
|
apt-get clean
|
|
|
|
# Créer les répertoires requis
|
|
RUN mkdir -p /run/mysqld /var/www && \
|
|
chown mysql:mysql /run/mysqld
|
|
|
|
# Copier les fichiers de configuration
|
|
COPY ./conf/50-server.cnf /etc/mysql/mariadb.conf.d/
|
|
COPY ./tools/init_db_template.sql /docker-entrypoint-initdb.d/init_db_template.sql
|
|
COPY ./tools/entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
# Assurer les permissions correctes pour le script et les fichiers SQL
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh && \
|
|
chmod 644 /docker-entrypoint-initdb.d/init_db_template.sql && \
|
|
chmod -R 777 /var/lib/mysql
|
|
|
|
# Exposer le port 3306
|
|
EXPOSE 3306
|
|
|
|
# Utiliser le script d'entrée
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|