FROM php:8.3-fpm

RUN apt-get update && apt-get install -y \
    git \
    unzip \
    libzip-dev \
    libpng-dev \
    libonig-dev \
    libxml2-dev \
    && docker-php-ext-install pdo_mysql mbstring zip \
    && rm -rf /var/lib/apt/lists/*

# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

# 3. MySQL 연결을 위한 PHP 확장 모듈 및 기타 필수 모듈 설치
RUN docker-php-ext-install pdo pdo_mysql mysqli zip

WORKDIR /var/www/html
