chore: Update Dockerfile to include PHP 8.2 and necessary extensions

This commit is contained in:
2024-07-27 19:19:13 +02:00
parent 8622a71053
commit 3eb67753f3
2 changed files with 40 additions and 0 deletions
+32
View File
@@ -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"]