FROM php:8.2-fpm
# Installation de dépendances nécessaires pour Composer
RUN apt-get update && apt-get install -y \
    git \
    unzip

# Installation de Composer
# TODO : should use a image with composer install
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN docker-php-ext-install pdo pdo_mysql

COPY . /var/www/

WORKDIR /var/www/

RUN composer install