Atualizar Dockerfile

This commit is contained in:
2025-06-12 12:54:35 +00:00
parent ee78e3765b
commit 25659d2831

View File

@@ -1,32 +1,24 @@
FROM php:8.1-apache FROM php:8.1-apache
ENV TZ=America/Sao_Paulo ENV TZ=America/Sao_Paulo
RUN a2enmod rewrite
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libicu-dev \ unzip git zip && \
libzip-dev \ rm -rf /var/lib/apt/lists/*
libjpeg-dev \
libpng-dev \ COPY --from=mlocati/php-extension-installer:latest \
libfreetype6-dev \ /usr/bin/install-php-extensions /usr/local/bin/
unzip \
git \ RUN a2enmod rewrite && \
zip \ install-php-extensions gd intl pdo_mysql zip
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install intl zip pdo pdo_mysql mbstring gd \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html WORKDIR /var/www/html
RUN echo "DirectoryIndex login.php index.php" \
RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/directoryindex.conf && \ > /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 && rm app.zip RUN unzip -o app.zip && 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"]