FROM php:7.4-fpm # Install system dependencies RUN apt-get update && apt-get install -y \ git \ curl \ libpng-dev \ libonig-dev \ libxml2-dev \ zip \ unzip \ default-mysql-client # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Install dependencies for SOAP RUN apt-get update && apt-get install -y libxml2-dev # Install PHP extensions RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd soap # Get latest Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Set working directory WORKDIR /var/www/html # Install dependencies RUN if [ -f "composer.json" ]; then composer install --no-dev --optimize-autoloader; fi