FROM php:8-fpm # Copy composer.lock and composer.json # COPY composer.lock composer.json /var/www/ # Set working directory WORKDIR /var/www # Install dependencies RUN apt-get update && apt-get install -y \ libssl-dev \ build-essential \ libpng-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ locales \ zip \ jpegoptim optipng pngquant gifsicle \ vim \ unzip \ git \ curl \ libonig-dev \ libzip-dev \ libicu-dev \ sendmail # Install extensions RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl intl mysqli RUN docker-php-ext-install sockets # Install Composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Expose port 9000 and start php-fpm server EXPOSE 9000 CMD ["php-fpm"]