Skip to content

Commit

Permalink
Fix patching of vendor dependencies not working in Docker
Browse files Browse the repository at this point in the history
* As of 2.7, composer no longer allows installing plugins as root
* That breaks deploys with Docker as we prepare the image with the root user in our infra

See: composer/composer#11073
  • Loading branch information
pascalchevrel committed Apr 30, 2024
1 parent cd12f30 commit ac28539
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ RUN apk add --no-cache tzdata
ENV TZ="UTC"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Composer no longer allows plugins to run as a superuser as of release 2.7 which prevents us from patching upstream libraries
ENV COMPOSER_ALLOW_SUPERUSER=1

# use install-php-extensions to install required php extensions and composer
RUN curl https://github.com/mlocati/docker-php-extension-installer/releases/download/1.4.12/install-php-extensions \
--location --output /usr/local/bin/install-php-extensions && \
Expand Down

0 comments on commit ac28539

Please sign in to comment.