Update Dockerfile to install PHP extensions and configure
This commit is contained in:
+18
-1
@@ -1 +1,18 @@
|
||||
�
|
||||
FROM php:8.2-apache
|
||||
|
||||
# Install necessary PHP extensions for MySQL and Image handling
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype6-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd pdo_mysql
|
||||
|
||||
# Enable Apache mod_rewrite (useful for many PHP apps)
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Copy your source code into the container
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
Reference in New Issue
Block a user