Skip to content

Commit 04c7898

Browse files
authored
Merge pull request #50 from DrupalStand/mariadb-container-fix
Mariadb container fix
2 parents 78bf6ee + 8660a07 commit 04c7898

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

docker-src/db/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ LABEL maintainer="DrupalStand"
44
RUN apk --no-cache add --update mariadb mariadb-client pwgen
55

66
ADD files/run.sh /scripts/run.sh
7-
ADD conf/map.cnf /etc/mysql/conf.d/map.cnf
7+
ADD conf/map.cnf /etc/my.cnf.d/map.cnf
88

9-
RUN mkdir /scripts/pre-exec.d && \
9+
# Comment out skip-networking
10+
RUN sed -e '/skip-networking/ s/^#*/#/' -i /etc/my.cnf.d/mariadb-server.cnf && \
11+
mkdir /scripts/pre-exec.d && \
1012
mkdir /scripts/pre-init.d && \
1113
chmod -R 755 /scripts
1214

docker-src/db/files/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ else
2525

2626
chown -R mysql:mysql /var/lib/mysql
2727

28-
mysql_install_db --user=mysql > /dev/null
28+
mysql_install_db --user=mysql --datadir=/var/lib/mysql > /dev/null
2929

3030
if [ "$MYSQL_ROOT_PASSWORD" = "" ]; then
3131
MYSQL_ROOT_PASSWORD=`pwgen 16 1`

0 commit comments

Comments
 (0)