stat-utas commited on
Commit
1f70b45
·
verified ·
1 Parent(s): bd01c36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -26,7 +26,7 @@ RUN mkdir -p /var/lib/mysql /var/run/mysqld && \
26
  COPY my.cnf /etc/mysql/my.cnf
27
 
28
  # Initialize the MariaDB data directory
29
- RUN mysql_install_db --defaults-file=/etc/mysql/my.cnf
30
 
31
  # Set environment variables for MariaDB
32
  ENV MYSQL_ROOT_PASSWORD=rootpassword
@@ -37,5 +37,5 @@ ENV MYSQL_PASSWORD=moodlepassword
37
  # Expose port 3306 for MariaDB
38
  EXPOSE 3306
39
 
40
- # Start the MariaDB server with safe options for debugging
41
- CMD ["mysqld", "--skip-grant-tables", "--general-log"]
 
26
  COPY my.cnf /etc/mysql/my.cnf
27
 
28
  # Initialize the MariaDB data directory
29
+ RUN mysqld --initialize-insecure --user=mysql
30
 
31
  # Set environment variables for MariaDB
32
  ENV MYSQL_ROOT_PASSWORD=rootpassword
 
37
  # Expose port 3306 for MariaDB
38
  EXPOSE 3306
39
 
40
+ # Start the MariaDB server
41
+ CMD ["mysqld"]