-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.apache
More file actions
24 lines (16 loc) · 827 Bytes
/
Dockerfile.apache
File metadata and controls
24 lines (16 loc) · 827 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
ARG PHP_VERSION=8.4
FROM php:${PHP_VERSION}-apache
RUN curl -sSLf \
-o /usr/local/bin/install-php-extensions \
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions gd zip exif mysqli pgsql pdo pdo_mysql pdo_pgsql soap imagick xmlrpc bcmath @composer opcache
ENV PATH="$PATH:~/.composer/vendor/bin"
# Apache Extensions
RUN a2enmod headers rewrite expires deflate
# Memory limit
RUN echo "memory_limit = 512M" >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
# Update document root
RUN sed -ri -e 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/html!/var/www/html/public!g' /etc/apache2/apache2.conf
WORKDIR /var/www/html