Skip to content

Commit b7cc72b

Browse files
committed
fix: php-fpm dockerfile, chown and chmod for php.ini maintainability
1 parent 0226634 commit b7cc72b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

images/php-fpm/Dockerfile

Lines changed: 4 additions & 3 deletions
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 --chown $DOCKER_IMAGE_FOLDER/php-fpm/php.ini /usr/local/etc/php/php.ini
45+
COPY $DOCKER_IMAGE_FOLDER/php-fpm/php.ini /usr/local/etc/php/php.ini
4646

4747
# Git
4848
RUN apk add git
@@ -54,9 +54,10 @@ RUN addgroup -g $GROUP_ID -S dockeruser
5454

5555
RUN adduser -S -G dockeruser -u $USER_ID -s /bin/ash dockeruser
5656

57-
USER dockeruser
57+
RUN chown dockeruser /usr/local/etc/php/php.ini
58+
RUN chmod 0777 /usr/local/etc/php
5859

59-
RUN chwon dockeruser /usr/local/etc/php/php.ini
60+
USER dockeruser
6061

6162
WORKDIR /home/dockeruser/magento
6263

0 commit comments

Comments
 (0)