FROM php:8.4-apache
RUN apt-get update && apt-get install -y \
git unzip libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install zip gd \
&& rm -rf /var/lib/apt/lists/*
# Dodaj composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
COPY composer.json composer.lock* ./
RUN /usr/bin/composer install --no-dev
COPY src/ src/
COPY example/ example/
RUN echo "DirectoryIndex example/example.php" > /etc/apache2/conf-available/custom.conf \
&& a2enconf custom
EXPOSE 80
CMD ["apache2-foreground"]
|