# Server image: same PHP/Apache as docker/Dockerfile, plus the shop code baked in. # On start, server-entrypoint.sh copies the code into the volume at /var/www/html # (Linux filesystem). Docker Desktop bind mounts from C:\ are ~40x slower for PHP. FROM php:8.3-apache RUN apt-get update \ && apt-get install -y --no-install-recommends \ libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev \ libzip-dev libxml2-dev libicu-dev unzip rsync \ && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ && docker-php-ext-install -j"$(nproc)" pdo_mysql mysqli gd zip soap intl opcache \ && a2enmod rewrite headers \ && rm -rf /var/lib/apt/lists/* COPY docker/php.ini /usr/local/etc/php/conf.d/qloapps.ini COPY docker/php-server.ini /usr/local/etc/php/conf.d/zz-server.ini COPY docker/apache-hardening.conf /etc/apache2/conf-enabled/zz-hardening.conf RUN sed -ri 's!AllowOverride None!AllowOverride All!g' /etc/apache2/apache2.conf COPY . /opt/qloapps-src COPY docker/server-entrypoint.sh /usr/local/bin/server-entrypoint.sh # Windows checkouts may carry CRLF line endings RUN sed -i 's/\r$//' /usr/local/bin/server-entrypoint.sh && chmod +x /usr/local/bin/server-entrypoint.sh WORKDIR /var/www/html ENTRYPOINT ["server-entrypoint.sh"] CMD ["apache2-foreground"]