# Use the official Ubuntu base image FROM ubuntu:latest # Set environment variables to non-interactive for automatic installation ENV DEBIAN_FRONTEND=noninteractive # Update the package list and install necessary packages RUN apt-get update && \ apt-get install -y \ apache2 \ software-properties-common \ wget \ git \ gnupg2 \ lsb-release # Add the PHP PPA for PHP 8.3 RUN add-apt-repository ppa:ondrej/php -y # Install PHP 8.3 and necessary extensions RUN apt-get update && \ apt-get install -y \ php8.3 php8.3-dev php8.3-cli php8.3-common php8.3-intl php8.3-mysql php8.3-pgsql php8.3-xdebug php8.3-opcache php8.3-pdo php8.3-sqlite php8.3-mbstring php8.3-curl php8.3-imap php8.3-bcmath php8.3-zip php8.3-dom php8.3-xml php8.3-phar php8.3-gd php-pear php8.3-redis \ libapache2-mod-php8.3 # Install Tesseract OCR RUN apt-get install -y tesseract-ocr # Install pdftoppm and pdftotext RUN apt-get install -y poppler-utils # Install wkhtmltopdf RUN apt-get install -y xvfb libfontconfig wkhtmltopdf # Install imagemagick RUN apt-get install -y imagemagick # Enable Apache mods and restart Apache RUN a2enmod php8.3 && \ a2enmod rewrite && \ a2enmod expires && \ a2enmod headers && \ a2enmod cache && \ a2enmod cache_disk # Expose port 80 for Apache EXPOSE 80 # Setup php-xdebug COPY data/000-default.conf /etc/apache2/sites-enabled/000-default.conf COPY data/20-xdebug.ini /etc/php/8.3/apache2/conf.d/20-xdebug.ini RUN echo "ServerName 127.0.0.2" >> /etc/apache2/apache2.conf RUN service apache2 restart # Set the default command to run Apache in the foreground CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] # docker-compose up --watch