-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (25 loc) · 872 Bytes
/
Dockerfile
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
34
35
FROM php:8.3.6-apache
ARG DEBIAN_FRONTEND=noninteractive
# System dependencies.
RUN apt-get update \
&& apt-get install -y sendmail libpng-dev libzip-dev zlib1g-dev libonig-dev
# PHP libraries.
RUN pecl install apcu xdebug
RUN docker-php-ext-install mbstring zip gd pdo_mysql sockets
# Enable PHP extensions.
RUN docker-php-ext-enable apcu
# Enable Apache2 modules.
RUN a2enmod rewrite headers
# Install PHPLOC.
RUN curl -L https://phar.phpunit.de/phploc.phar > /usr/local/bin/phploc \
&& chmod +x /usr/local/bin/phploc
# Setup application folder.
RUN mkdir -p /opt/app/public
RUN ln -s /opt/app/public /var/www/html/app
RUN chmod 777 /var/www/html
# Configure PHP.
COPY config/etc/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Composer.
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
# Working directory.
WORKDIR /opt/app