strolap-calendar/Dockerfile
2025-03-23 13:26:38 +01:00

36 lines
888 B
Docker

FROM php:8.2-cli as base
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
libicu-dev \
&& docker-php-ext-install \
zip \
intl \
pdo_mysql
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install Symfony CLI
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
# Set working directory
WORKDIR /var/www/html
CMD ["symfony", "serve", "--port=8000", "--no-tls", "--allow-http", "--allow-all-ip"]
FROM base as production
# Copy application files
COPY . .
# Install dependencies
RUN composer install --no-interaction --optimize-autoloader
# Command to run Symfony server
CMD ["symfony", "serve", "--port=8000", "--no-tls", "--allow-http", "--allow-all-ip"]