-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 729 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM php:7.4-apache
# Actualizar los repositorios e instalar software-properties-common
RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository universe && \
apt-get update -y
# Instalar las dependencias necesarias
RUN apt-get install -y \
libmysqlclient-dev \
libonig-dev \
&& docker-php-ext-install pdo pdo_mysql mbstring
# Habilitar la reescritura de URL de Apache
RUN a2enmod rewrite
# Copiar archivos del proyecto
COPY . /var/www/html/
# Establecer permisos adecuados para los archivos
RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 755 /var/www/html
# Exponer el puerto 80
EXPOSE 80
# Comando para iniciar Apache
CMD ["apache2-foreground"]