chore: Update Dockerfile to include PHP 8.2 and necessary extensions
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
# use PHP 8.2
|
||||||
|
FROM php:8.2-fpm
|
||||||
|
|
||||||
|
# Install common php extension dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libfreetype-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libpng-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libzip-dev \
|
||||||
|
unzip \
|
||||||
|
libpng-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libzip-dev \
|
||||||
|
libpq-dev \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd \
|
||||||
|
&& docker-php-ext-install -j$(nproc) zip pdo pdo_mysql pdo_pgsql mbstring
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /var/www/app
|
||||||
|
|
||||||
|
# install composer
|
||||||
|
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/composer
|
||||||
|
|
||||||
|
# Copy entrypoint script
|
||||||
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Set entrypoint script as the entrypoint
|
||||||
|
ENTRYPOINT ["sh", "/usr/local/bin/entrypoint.sh"]
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Ensure permissions for www-data user
|
||||||
|
chown -R www-data:www-data /var/www/app
|
||||||
|
chmod -R 775 /var/www/app/storage
|
||||||
|
|
||||||
|
# Start PHP-FPM
|
||||||
|
php-fpm
|
||||||
Reference in New Issue
Block a user