dockerized-laravel-template/Dockerfile.template
2026-01-12 15:51:06 -05:00

31 lines
625 B
Docker
Executable File

# Use the official PHP image with FPM
FROM php:${PHP_VERSION}
# Set working directory
WORKDIR /var/www/html
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
nodejs \
npm \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions required by Laravel
RUN docker-php-ext-install ${PHP_EXTENSIONS}
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Expose port 9000 for PHP-FPM
EXPOSE 9000
# Default command to start PHP-FPM
CMD ["php-fpm"]