From 48451181d076c4fa53407140a3c411f3d9669038 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Fri, 6 Jan 2023 16:54:31 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2820744..ed2500f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ FROM mysql:latest -#RUN chown -R mysql:root /var/lib/mysql/ +RUN chown -R mysql:root /var/lib/mysql/ -ENV MYSQL_ROOT_PASSWORD=root +ENV MYSQL_DATABASE=from_secret: MYSQL_DATABASE +ENV MYSQL_USER=from_secret: MYSQL_USER_TOM +ENV MYSQL_PASSWORD=from_secret: MYSQL_PASSWORD_TOM +ENV MYSQL_ROOT_PASSWORD=from_secret: MYSQL_ROOT_PASSWORD -COPY bobParty.sql /docker-entrypoint-initdb.d +ADD bobParty.sql bobParty.sql -#EXPOSE 3306 \ No newline at end of file +RUN sed -i 's/MYSQL_DATABASE/'$MYSQL_DATABASE'/g' bobParty.sql +RUN cp bobParty.sql /docker-entrypoint-initdb.d \ No newline at end of file