Fix MariaDB initialization with mysql_install_db
This commit is contained in:
+4
-2
@@ -17,8 +17,10 @@ WORKDIR /app
|
|||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apk add --no-cache mariadb mariadb-client mariadb-server-utils nginx bash
|
RUN apk add --no-cache mariadb mariadb-client mariadb-server-utils nginx bash
|
||||||
|
|
||||||
# Initialize directories
|
# Initialize MariaDB directories and schema
|
||||||
RUN mkdir -p /run/mysqld /var/lib/mysql && chown -R mysql:mysql /run/mysqld /var/lib/mysql
|
RUN mkdir -p /run/mysqld /var/lib/mysql && \
|
||||||
|
chown -R mysql:mysql /run/mysqld /var/lib/mysql && \
|
||||||
|
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||||
|
|
||||||
# Copy built frontend to nginx
|
# Copy built frontend to nginx
|
||||||
COPY --from=builder /build/dist /usr/share/nginx/html
|
COPY --from=builder /build/dist /usr/share/nginx/html
|
||||||
|
|||||||
Reference in New Issue
Block a user