Files
apache-with-php/Dockerfile
T
daniel156161 fd881832aa
Build and Push Docker Container / build-and-push (push) Successful in 3m33s
add php zip extension
2025-12-02 16:50:47 +01:00

23 lines
567 B
Docker
Executable File

FROM php:8.4-apache
ENV TZ=Europe/Vienna
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y \
libzip-dev \
unzip \
&& docker-php-ext-install zip mysqli pdo pdo_mysql \
&& rm -rf /var/lib/apt/lists/*
# Install Composer from the official image
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Set the working directory inside the container
WORKDIR /var/www/html
COPY ./src /var/www/html/
RUN chown -R www-data:www-data /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]