FROM php:8.0-apache # Install git and unzip (needed by composer) RUN apt-get update && apt-get install -y git unzip && rm -rf /var/lib/apt/lists/* # Install composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer WORKDIR /var/www/html # Create composer.json that ignores security advisory RUN echo '{"require":{"sabberworm/php-css-parser":"8.3.0"},"config":{"audit":{"ignore":["PKSA-2b5y-mhcw-mt5g"]},"preferred-install":"dist"}}' > composer.json && \ composer install --no-interaction --prefer-dist # Copy test file COPY index.php /var/www/html/index.php # Ensure proper permissions RUN chown -R www-data:www-data /var/www/html EXPOSE 80