File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 11FROM php:7.4-apache
22
3- # Instalar dependencias del sistema
4- RUN apt-get update && apt-get install -y \
3+ # Actualizar los repositorios y limpiar cachés antes de instalar dependencias
4+ RUN apt-get clean && apt-get update -y && apt-get install -y \
55 libmysqlclient-dev \
66 libonig-dev \
77 && docker-php-ext-install pdo pdo_mysql mbstring
88
9- # Copiar tu aplicación al contenedor
9+ # Habilitar la reescritura de URL de Apache
10+ RUN a2enmod rewrite
11+
12+ # Copiar archivos del proyecto
1013COPY . /var/www/html/
1114
12- # Habilitar el módulo de Apache para permitir .htaccess (si es necesario)
13- RUN a2enmod rewrite
15+ # Establecer permisos adecuados para los archivos
16+ RUN chown -R www-data:www-data /var/www/html
17+ RUN chmod -R 755 /var/www/html
1418
1519# Exponer el puerto 80
1620EXPOSE 80
1721
22+ # Comando para iniciar Apache
23+ CMD ["apache2-foreground" ]
24+
25+
You can’t perform that action at this time.
0 commit comments