Atualizar Dockerfile

This commit is contained in:
2025-11-09 22:09:11 +00:00
parent bf3ca65fe9
commit 67264f8a6f

View File

@@ -1,37 +1,36 @@
FROM php:8.1-apache
ENV TZ=America/Sao_Paulo
RUN a2enmod rewrite
# Dependências + extensões PHP + Redis
RUN apt-get update && apt-get install -y \
libicu-dev \
libzip-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
unzip \
git \
zip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install intl zip pdo pdo_mysql gd opcache \
&& pecl install redis && docker-php-ext-enable redis \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
WORKDIR /var/www/html
RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/directoryindex.conf \
&& a2enconf directoryindex
COPY app.zip /var/www/html/
RUN unzip -o app.zip -d /var/www/html && rm app.zip
RUN chown -R www-data:www-data /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
FROM php:8.1-apache
ENV TZ=America/Sao_Paulo
RUN a2enmod rewrite
# Dependências + extensões PHP (sem Redis)
RUN apt-get update && apt-get install -y \
libicu-dev \
libzip-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
unzip \
git \
zip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install intl zip pdo pdo_mysql gd opcache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
WORKDIR /var/www/html
RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/directoryindex.conf \
&& a2enconf directoryindex
COPY app.zip /var/www/html/
RUN unzip -o app.zip -d /var/www/html && rm app.zip
RUN chown -R www-data:www-data /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]