This repository was archived by the owner on Jun 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-php7.2
More file actions
40 lines (33 loc) · 1.28 KB
/
Dockerfile-php7.2
File metadata and controls
40 lines (33 loc) · 1.28 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
FROM php:7.2-apache
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libmemcached-dev zlib1g-dev \
libicu-dev \
libxml2-dev \
; \
\
pecl install memcached-3.0.4 xdebug-2.6.0; \
docker-php-ext-enable memcached xdebug; \
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr; \
docker-php-ext-install pdo pdo_mysql mysqli gd intl soap; \
\
rm -rf /var/lib/apt/lists/*
RUN a2enmod rewrite
RUN a2enmod ssl
RUN a2enmod headers
RUN a2ensite 000-default
RUN a2ensite default-ssl
RUN echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_autostart = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_host = \${XDEBUG_REMOTE_HOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
COPY apache/default.conf /etc/apache2/sites-available/000-default.conf
COPY apache/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
COPY php/custom.ini /usr/local/etc/php/conf.d/custom.ini
COPY ssl/localhost.crt /etc/ssl/certs/localhost.crt
COPY ssl/localhost.key /etc/ssl/private/localhost.key
VOLUME /var/www
EXPOSE 443