diff --git a/10.2/docker-entrypoint.sh b/10.2/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/10.2/docker-entrypoint.sh +++ b/10.2/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi } diff --git a/10.3/docker-entrypoint.sh b/10.3/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/10.3/docker-entrypoint.sh +++ b/10.3/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi } diff --git a/10.4/docker-entrypoint.sh b/10.4/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/10.4/docker-entrypoint.sh +++ b/10.4/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi } diff --git a/10.5/docker-entrypoint.sh b/10.5/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/10.5/docker-entrypoint.sh +++ b/10.5/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi } diff --git a/10.6/docker-entrypoint.sh b/10.6/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/10.6/docker-entrypoint.sh +++ b/10.6/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi } diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b0a28588..4870f820 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -163,6 +163,8 @@ docker_create_db_directories() { if [ "$user" = "0" ]; then # this will cause less disk access than `chown -R` find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + # See https://github.com/MariaDB/mariadb-docker/issues/363 + find "${SOCKET%/*}" -maxdepth 0 \! -user mysql -exec chown mysql '{}' \; fi }