Skip to content

Commit 285fd39

Browse files
committed
Make arbitrary user work better out-of-the-box
1 parent b0f81a3 commit 285fd39

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

5.6/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ RUN { \
7070
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
7171
&& chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
7272
# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
73-
&& chmod 777 /var/run/mysqld \
73+
&& chmod 1777 /var/run/mysqld /var/lib/mysql \
7474
# comment out a few problematic configuration values
7575
&& find /etc/mysql/ -name '*.cnf' -print0 \
7676
| xargs -0 grep -lZE '^(bind-address|log)' \

5.7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RUN { \
7272
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
7373
&& chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
7474
# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
75-
&& chmod 777 /var/run/mysqld \
75+
&& chmod 1777 /var/run/mysqld /var/lib/mysql \
7676
# comment out a few problematic configuration values
7777
&& find /etc/mysql/ -name '*.cnf' -print0 \
7878
| xargs -0 grep -lZE '^(bind-address|log)' \

8.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RUN { \
7272
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
7373
&& chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
7474
# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
75-
&& chmod 777 /var/run/mysqld
75+
&& chmod 1777 /var/run/mysqld /var/lib/mysql
7676

7777
VOLUME /var/lib/mysql
7878
# Config files

0 commit comments

Comments
 (0)