mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
* Fix Dockerfile: update PHP version to 8.3 and improve Docker practices Co-authored-by: admdly <2807620+admdly@users.noreply.github.com> * Revert PHP version back to 8.5 with SHA256 pin Co-authored-by: admdly <2807620+admdly@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
FROM php:8.5-apache@sha256:96b50b7861cb6d1c10cd9f58c46b2c19606761a1209c20d410a509d4d1c935fd
|
|
|
|
# Install required packages, configure Apache, install PHP extensions, and clean-up.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends zlib1g-dev libpng-dev libicu-dev libbz2-dev cron \
|
|
&& a2enmod rewrite \
|
|
&& docker-php-ext-configure bz2 \
|
|
&& docker-php-ext-install -j$(nproc) bz2 \
|
|
&& docker-php-ext-configure gd \
|
|
&& docker-php-ext-install -j$(nproc) gd \
|
|
&& docker-php-ext-configure intl \
|
|
&& docker-php-ext-install -j$(nproc) intl \
|
|
&& docker-php-ext-configure pdo_mysql \
|
|
&& docker-php-ext-install -j$(nproc) pdo_mysql \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
|
|
|
# Copy files and set required permissions.
|
|
COPY --chown=www-data:www-data ./src/. /var/www/html
|
|
|
|
# Configure cron job for www-data in a dedicated crontab file for clarity.
|
|
RUN echo '*/5 * * * * /usr/local/bin/php /var/www/html/cron.php' > /tmp/www-data.cron \
|
|
&& crontab -u www-data /tmp/www-data.cron \
|
|
&& rm /tmp/www-data.cron
|
|
|
|
# Start cron and then run Apache in the foreground when the container starts.
|
|
CMD cron && apache2-foreground
|