fix: docker-compose enviroment values

This commit is contained in:
a.bouhuolia
2023-04-07 18:41:03 +02:00
parent c6cdbe11e6
commit ad8770f12c
5 changed files with 46 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
FROM mysql:5.7
USER root
ADD my.cnf /etc/mysql/conf.d/my.cnf
ARG MYSQL_DATABASE=default_database
@@ -12,5 +13,11 @@ ENV MYSQL_USER=$MYSQL_USER
ENV MYSQL_PASSWORD=$MYSQL_PASSWORD
ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
COPY ./init.sql /scripts/init.template.sql
COPY ./docker-entrypoint.sh /docker-entrypoint-initdb.d/docker-initialize.sh
RUN chown -R mysql:root /docker-entrypoint-initdb.d
RUN chown -R mysql:root /scripts
CMD ["mysqld"]
EXPOSE 3306