Skip to content

Commit bca991b

Browse files
committed
Update entrypoint.sh
bugfix for no root user or mount entrypoint in other apache (doi) image
1 parent 3e1d8e5 commit bca991b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ fi
7676
####################################################
7777

7878
## create php ini file with comment
79-
echo "; ${PHP_INI_FILE_NAME} create by entrypoint.sh in container image" > /usr/local/etc/php/conf.d/${PHP_INI_FILE_NAME}
79+
if [ "$(id -u)" -eq 0 ]; then
80+
echo "; ${PHP_INI_FILE_NAME} create by entrypoint.sh in container image" > /usr/local/etc/php/conf.d/${PHP_INI_FILE_NAME}
81+
fi
8082

8183
## set TimeZone
8284
if [ -n "$TZ" ]; then
@@ -480,6 +482,10 @@ fi
480482

481483
####################################################
482484

485+
if [ "$(id -u)" -eq 0 ]; then
486+
[ -d "/entrypoint.d/" ] || mkdir /entrypoint.d/
487+
fi
488+
483489
## more entrypoint-files
484490
find "/entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do
485491
case "$f" in

0 commit comments

Comments
 (0)