Oliver Davies
5afcb964dd
Even though Composer v2 was being pulled from the Composer Docker image, Composer v1 was still being used. Because I've added the `/app/bin` path to `$PATH`, a version in `/app/bin/composer` was being used. The simplest way that I can fix this is re-ordering the variable so that the path is added after the originals and the Composer version in `/usr/bin/composer` is used.
38 lines
711 B
Docker
38 lines
711 B
Docker
FROM php:7.4-fpm-buster AS base
|
|
|
|
RUN apt update -yqq && apt install -yqq \
|
|
libpng-dev \
|
|
mariadb-client \
|
|
zlib1g-dev \
|
|
&& docker-php-ext-install \
|
|
exif \
|
|
gd \
|
|
pdo_mysql
|
|
|
|
###
|
|
|
|
FROM base AS dev
|
|
|
|
ARG xdebug_version=2.9.0
|
|
|
|
RUN apt update -yqq \
|
|
&& apt install -yqq \
|
|
git \
|
|
pv \
|
|
vim \
|
|
zip \
|
|
&& pecl install xdebug-${xdebug_version} \
|
|
&& docker-php-ext-enable xdebug
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
WORKDIR /app
|
|
ENV PATH="$PATH:/app/bin"
|
|
|
|
COPY composer.json composer.lock /app/
|
|
COPY assets /app/assets
|
|
COPY tools/patches /app/tools/patches
|
|
RUN composer install
|
|
|
|
COPY tools/docker/images/php/configs/php.ini /usr/local/etc/php/conf.d/php.ini
|