-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug.Dockerfile
More file actions
45 lines (34 loc) · 1.17 KB
/
debug.Dockerfile
File metadata and controls
45 lines (34 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
44
45
FROM php:8.4-apache
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
zlib1g-dev \
libxml2-dev \
libssl-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
unzip \
git \
gettext-base
# Install PHP extensions
RUN /usr/local/bin/docker-php-ext-install mysqli pdo pdo_mysql
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Apache configuration
COPY docker/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
# Application setup
COPY . /var/www/
WORKDIR /var/www
# Install dependencies (including dev for debug mode), then delete Composer files
RUN composer install --no-interaction
RUN rm composer.*
RUN chown -R www-data:www-data /var/www
COPY docker/start-apache /usr/local/bin
ENV APP_PATH=/var/www
COPY docker/000-default.conf /etc/apache2/sites-available/000-default.conf
CMD ["start-apache"]