Skip to content

Commit 595a8ed

Browse files
feat: change php Dockerfile
1 parent 98e97fd commit 595a8ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

php/7.2.34/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ COPY ./data/supervisor-4.2.5.tar.gz /tmp/
244244
COPY ./data/php-fpm.ini /etc/supervisor.d/php-fpm.ini
245245
COPY ./data/supervisord.conf /etc/supervisord.conf
246246

247+
ENV COMPOSER_HOME=/tmp/.composer
248+
247249
RUN apt-get update && \
248250
apt-get install -y python3 python3-pip git wget&& \
249251
rm -rf /var/lib/apt/lists/* && \
@@ -258,11 +260,9 @@ RUN apt-get update && \
258260
php /tmp/composer-setup.php --install-dir=/tmp && \
259261
mv /tmp/composer.phar /usr/bin/composer && \
260262
chmod +x /usr/bin/composer &&\
261-
rm -rf /tmp/composer-setup.php
262-
263-
ENV COMPOSER_HOME=/tmp/.composer
264-
265-
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
263+
rm -rf /tmp/composer-setup.php &&\
264+
usermod -u 1000 www-data && groupmod -g 1000 www-data &&\
265+
mkdir -p ${COMPOSER_HOME} && chown -R www-data:www-data ${COMPOSER_HOME}
266266

267267
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
268268

0 commit comments

Comments
 (0)