Update docker file
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Triono Putra 2025-05-28 15:59:32 +07:00
parent 0b9cfe2306
commit b62c3a0ff5

View File

@ -1,10 +1,19 @@
FROM php:8.1-fpm FROM php:8.4-fpm
# Install dependencies # Install system dependencies & PHP extensions
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libzip-dev \
unzip \
git \
libpq-dev \ libpq-dev \
zip unzip curl git \ libicu-dev \
&& docker-php-ext-install pdo_pgsql zip \
curl \
&& docker-php-ext-install \
intl \
zip \
pdo_pgsql \
bcmath
# Install Composer # Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
@ -14,19 +23,16 @@ WORKDIR /var/www
# Copy source # Copy source
COPY . . COPY . .
# Copy default env
COPY .env.example .env COPY .env.example .env
# Install Laravel dependencies # Install dependencies
RUN composer install --no-interaction --prefer-dist --optimize-autoloader RUN composer install --no-interaction --prefer-dist --optimize-autoloader
# Generate Laravel app key # Generate app key
RUN php artisan key:generate RUN php artisan key:generate
# Set permissions for Laravel # Set permissions
RUN chown -R www-data:www-data /var/www \ RUN chown -R www-data:www-data /var/www \
&& chmod -R 755 /var/www \
&& chmod -R 775 storage bootstrap/cache \ && chmod -R 775 storage bootstrap/cache \
&& chown -R www-data:www-data storage bootstrap/cache && chown -R www-data:www-data storage bootstrap/cache