baleen/docker/php/Dockerfile
2024-11-15 11:24:21 +00:00

24 lines
539 B
Docker

FROM composer:lts AS build
WORKDIR /var/www/html
COPY composer.json .
COPY composer.lock .
RUN --mount=type=bind,source=composer.json,target=composer.json \
--mount=type=bind,source=composer.lock,target=composer.lock \
--mount=type=cache,target=/tmp/cache \
composer install --no-dev --no-interaction
FROM php:8.3-fpm AS run
ARG DB_CONNECTION
WORKDIR /var/www/html
RUN apt-get update && apt-get install -y \
libpq-dev
RUN docker-php-ext-install pdo_pgsql
COPY --from=build /var/www/html/vendor /var/www/html/vendor