Update file Dockerfile

This commit is contained in:
Muhammad Alfin Afif Al Farizi Farham 2026-02-04 10:38:50 +07:00
parent 1af0046490
commit 48f3988238

View File

@ -5,7 +5,6 @@ FROM dunglas/frankenphp:1-php8.3 AS composer
WORKDIR /app
# PHP extensions
RUN apt-get update && apt-get install -y \
libpng-dev libjpeg-dev libfreetype6-dev \
libzip-dev libicu-dev pkg-config \
@ -13,10 +12,8 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install gd zip intl exif \
&& rm -rf /var/lib/apt/lists/*
# Composer binary
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# ⬇️ PENTING: copy file inti Laravel dulu
COPY artisan artisan
COPY bootstrap bootstrap
COPY config config
@ -24,11 +21,17 @@ COPY app app
COPY routes routes
COPY database database
# 🔥 INI YANG KURANG SELAMA INI
RUN mkdir -p \
storage/framework/cache \
storage/framework/sessions \
storage/framework/views \
bootstrap/cache
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-interaction
### ===============================
### STAGE 2: FRONTEND BUILD
### ===============================