Update Dockerfile
Browse files- 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
|
| 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
|
| 41 |
-
CMD ["mysqld"
|
|
|
|
| 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"]
|