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