# Set up PHP for Laravel FROM php:8.1-fpm # Install necessary extensions and dependencies for Laravel RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev zip git unzip # Install PHP extensions RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \ docker-php-ext-install gd # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Set working directory WORKDIR /var/www/html # Copy Laravel files into container COPY . . # Install PHP dependencies RUN composer install --no-interaction --optimize-autoloader --no-dev # Expose port for PHP-FPM EXPOSE 9000 CMD ["php-fpm"]