2025-09-26 01:13:44 +02:00
|
|
|
FROM php:8.3-fpm-alpine
|
|
|
|
|
|
|
|
|
|
# Install system dependencies
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
|
git \
|
|
|
|
|
curl \
|
|
|
|
|
libpng-dev \
|
|
|
|
|
oniguruma-dev \
|
|
|
|
|
libxml2-dev \
|
|
|
|
|
zip \
|
|
|
|
|
unzip \
|
|
|
|
|
nodejs \
|
|
|
|
|
npm \
|
|
|
|
|
shadow
|
|
|
|
|
|
|
|
|
|
# Install PHP extensions
|
|
|
|
|
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
|
|
|
|
|
|
|
|
|
|
# Install Composer
|
|
|
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
|
|
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
2025-09-26 21:50:44 +02:00
|
|
|
# Create storage and bootstrap/cache directories with proper permissions
|
|
|
|
|
RUN mkdir -p storage/app/public storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache && \
|
|
|
|
|
chmod -R 777 storage bootstrap/cache
|
2025-09-26 01:13:44 +02:00
|
|
|
|
2025-09-26 21:50:44 +02:00
|
|
|
# Run as root to avoid permission issues with volume mounts
|
2025-09-26 01:13:44 +02:00
|
|
|
|
|
|
|
|
# Expose port 8000 for artisan serve
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
# Start Laravel development server with composer install
|
|
|
|
|
CMD sh -c "composer install && php artisan key:generate --force && php artisan serve --host=0.0.0.0 --port=8000"
|