This commit is contained in:
Saufi
2026-06-03 09:11:52 +08:00
parent a14d43fe34
commit 75d046228b
6 changed files with 116 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
FROM php:8.3-apache
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
# System dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
unzip \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libicu-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install pdo_mysql gd intl zip pcntl \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& a2enmod rewrite headers \
&& rm -rf /var/lib/apt/lists/*
# Node.js 22 LTS (for npm / vite)
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Apache vhost
COPY docker/php-apache/vhost.conf /etc/apache2/sites-available/000-default.conf
WORKDIR /var/www/html
RUN chown -R www-data:www-data /var/www/html