-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-php-apache
More file actions
35 lines (27 loc) · 810 Bytes
/
Dockerfile-php-apache
File metadata and controls
35 lines (27 loc) · 810 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
30
31
32
33
FROM php:8.2-apache
# Instala extensões necessárias
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
unzip \
libzip-dev \
libonig-dev \
pkg-config \
&& docker-php-ext-install \
pdo_mysql \
mysqli \
mbstring \
sockets \
bcmath \
opcache \
&& a2enmod rewrite headers \
&& rm -rf /var/lib/apt/lists/*
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Configura o VirtualHost para apontar para /public
COPY apache-site.conf /etc/apache2/sites-available/000-default.conf
WORKDIR /var/www/html
# Mantém permissões mais permissivas para ambiente de dev
RUN chown -R www-data:www-data /var/www/html
# Comando padrão do Apache
CMD ["apache2-foreground"]