Skip to content

Commit 1f30fea

Browse files
committed
Fixing double call to setup_extensions
1 parent 6d26456 commit 1f30fea

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

utils/docker-entrypoint-as-root.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,15 @@ fi
116116
unset DOCKER_FOR_MAC_REMOTE_HOST
117117
unset REMOTE_HOST_FOUND
118118

119-
php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini
120-
php /usr/local/bin/setup_extensions.php | sudo bash
119+
sudo chown docker:docker /opt/php_env_var_cache.php
120+
/usr/bin/real_php /usr/local/bin/check_php_env_var_changes.php &> /dev/null
121+
122+
/usr/bin/real_php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini
123+
/usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash
121124

122125
# output on the logs can be done by writing on the "tini" PID. Useful for CRONTAB
123126
TINI_PID=`ps -e | grep tini | awk '{print $1;}'`
124-
php /usr/local/bin/generate_cron.php $TINI_PID > /tmp/generated_crontab
127+
/usr/bin/real_php /usr/local/bin/generate_cron.php $TINI_PID > /tmp/generated_crontab
125128
chmod 0644 /tmp/generated_crontab
126129

127130
# If generated_crontab is not empty, start supercronic
@@ -130,13 +133,13 @@ if [[ -s /tmp/generated_crontab ]]; then
130133
fi
131134

132135
if [[ "$IMAGE_VARIANT" == "apache" ]]; then
133-
php /usr/local/bin/enable_apache_mods.php | bash
136+
/usr/bin/real_php /usr/local/bin/enable_apache_mods.php | bash
134137
fi
135138

136139
if [ -e /etc/container/startup.sh ]; then
137140
sudo -E -u "#$DOCKER_USER_ID" /etc/container/startup.sh
138141
fi
139-
sudo -E -u "#$DOCKER_USER_ID" sh -c "php /usr/local/bin/startup_commands.php | bash"
142+
sudo -E -u "#$DOCKER_USER_ID" sh -c "/usr/bin/real_php /usr/local/bin/startup_commands.php | bash"
140143

141144
if [[ "$APACHE_DOCUMENT_ROOT" == /* ]]; then
142145
export ABSOLUTE_APACHE_DOCUMENT_ROOT="$APACHE_DOCUMENT_ROOT"

0 commit comments

Comments
 (0)