fix Dockerfile
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,21 +1,35 @@
|
|||||||
FROM php:8.2-fpm-alpine
|
FROM php:8.2-fpm-alpine
|
||||||
|
|
||||||
# Install dependencies
|
# Install system dependencies and PHP extensions
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
|
# Add these for common Laravel extensions
|
||||||
|
libpng-dev \
|
||||||
|
libjpeg-turbo-dev \
|
||||||
|
freetype-dev \
|
||||||
|
oniguruma-dev \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install -j$(nproc) \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
pdo_pgsql \
|
pdo_pgsql \
|
||||||
pgsql \
|
pgsql \
|
||||||
opcache \
|
opcache \
|
||||||
zip \
|
zip \
|
||||||
|
bcmath \
|
||||||
|
gd \
|
||||||
|
exif \
|
||||||
|
pcntl \
|
||||||
|
mysqli \
|
||||||
|
pdo_mysql \
|
||||||
&& docker-php-ext-enable \
|
&& docker-php-ext-enable \
|
||||||
pdo_pgsql \
|
pdo_pgsql \
|
||||||
pgsql \
|
pgsql \
|
||||||
opcache \
|
opcache \
|
||||||
zip
|
zip \
|
||||||
|
bcmath \
|
||||||
|
gd
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
@@ -25,8 +39,9 @@ WORKDIR /var/www/html
|
|||||||
# Copy composer files first (for better caching)
|
# Copy composer files first (for better caching)
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies with platform requirements ignored (temporary fix)
|
||||||
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
|
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader || \
|
||||||
|
composer install --no-dev --no-interaction --no-progress --optimize-autoloader --ignore-platform-req=ext-bcmath --ignore-platform-req=ext-gd --ignore-platform-req=ext-exif --ignore-platform-req=ext-pcntl
|
||||||
|
|
||||||
# Copy application files
|
# Copy application files
|
||||||
COPY --chown=www-data:www-data . .
|
COPY --chown=www-data:www-data . .
|
||||||
|
|||||||
Reference in New Issue
Block a user