Build/docker/WebDockerfile
Dennis Eichhorn 0ee2aeaca1
Some checks failed
CI / linting (push) Has been cancelled
fix version and bugs
2024-05-21 00:09:04 +02:00

56 lines
1.7 KiB
Plaintext

# 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 \
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
RUN echo -e "zend_extension=xdebug.so\nxdebug.mode=debug,profile,trace\nxdebug.start_with_request=yes\nxdebug.client_port=9003\nxdebug.client_host=localhost\nxdebug.trace_format=1" > /etc/php/8.3/apache2/conf.d/20-xdebug.ini
RUN service apache2 restart
# Set the default command to run Apache in the foreground
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
# docker-compose up --watch