Skip to content

Commit 44c75a0

Browse files
committed
feat: Update Dockerfile to include Composer installation and set environment variable; modify supervisord config to specify user.
1 parent f3c71c0 commit 44c75a0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docker/frankenphp/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ WORKDIR /app
1010
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
1111
RUN install-php-extensions \
1212
bcmath \
13+
@composer \
1314
exif \
1415
gd \
1516
imagick \
@@ -21,6 +22,9 @@ RUN install-php-extensions \
2122
xdebug \
2223
zip
2324

25+
# set composer environment
26+
ENV COMPOSER_ALLOW_SUPERUSER=1
27+
2428
# change PHP config
2529
COPY docker/php/php.ini /usr/local/etc/php/conf.d/base.ini
2630

@@ -43,5 +47,7 @@ COPY docker/frankenphp/supervisord/conf.d/frankenphp.conf /etc/supervisor/conf.d
4347
# copy queue worker config uncommented for use with yii2-queue
4448
#COPY docker/frankenphp/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
4549

50+
RUN mkdir -p /var/run && chown -R www-data:www-data /var/run
51+
4652
# Run supervisord
4753
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]

docker/frankenphp/supervisord/conf.d/frankenphp.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ stdout_logfile=/dev/stdout
1010
stdout_logfile_maxbytes=0
1111
stderr_logfile=/dev/stderr
1212
stderr_logfile_maxbytes=0
13+
user=www-data

0 commit comments

Comments
 (0)