Files
karateturniere/Dockerfile
Mario Peters 02977e0311 add docker
2026-01-03 18:48:02 +01:00

33 lines
902 B
Docker

FROM php:7.4-apache
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql zip gettext
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html
# Install PHP dependencies
# We use --no-scripts because some scripts might depend on the DB being ready
# Using 'update' because composer.lock is out of sync with composer.json
RUN composer update --no-interaction --optimize-autoloader --no-scripts
# Set permissions (adjust as needed)
RUN chown -R www-data:www-data /var/www/html