Skip to content

Commit 0226634

Browse files
committed
fix: php.ini dockeruser owner and xdebug.mode sed
1 parent b5f9eb7 commit 0226634

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

bin/xdebug/mode

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ cd ${DOCKER_DIRECTORY}
3131

3232
if [ $(uname) = "Darwin" ]
3333
then
34-
docker-compose exec -u root php-fpm sed -i '' "s/xdebug.mode=.*/xdebug.mode=$1/g" /usr/local/etc/php/php.ini
34+
docker-compose exec php-fpm sed -i '' "s/xdebug.mode=.*/xdebug.mode=$1/g" /usr/local/etc/php/php.ini
3535
else
36-
docker-compose exec -u root php-fpm sed -i "s/xdebug.mode=.*/xdebug.mode=$1/g" /usr/local/etc/php/php.ini
36+
docker-compose exec php-fpm sed -i "s/xdebug.mode=.*/xdebug.mode=$1/g" /usr/local/etc/php/php.ini
3737
fi
3838

3939
echo "reloading php-fpm configuration"

images/php-fpm/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN apk add --no-cache $PHPIZE_DEPS \
4242
&& pecl install xdebug-3.0.4 \
4343
&& docker-php-ext-enable xdebug
4444

45-
COPY $DOCKER_IMAGE_FOLDER/php-fpm/php.ini /usr/local/etc/php/php.ini
45+
COPY --chown $DOCKER_IMAGE_FOLDER/php-fpm/php.ini /usr/local/etc/php/php.ini
4646

4747
# Git
4848
RUN apk add git
@@ -56,6 +56,8 @@ RUN adduser -S -G dockeruser -u $USER_ID -s /bin/ash dockeruser
5656

5757
USER dockeruser
5858

59+
RUN chwon dockeruser /usr/local/etc/php/php.ini
60+
5961
WORKDIR /home/dockeruser/magento
6062

6163
EXPOSE 9000

0 commit comments

Comments
 (0)