-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (31 loc) · 1.38 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (31 loc) · 1.38 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
FROM php:7.2-apache
COPY vhost-comparison.conf /etc/apache2/sites-enabled
RUN apt-get update \
&& apt-get install -y git zlib1g-dev libicu-dev g++ libjpeg-dev libpng-dev \
&& docker-php-ext-install zip pdo_mysql intl gd \
&& a2enmod rewrite \
&& curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf \
&& mkdir /etc/apache2/ssl \
&& openssl req \
-new \
-newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=comparison.loc" \
-keyout /etc/apache2/ssl/apache.key \
-out /etc/apache2/ssl/apache.crt \
&& a2enmod ssl \
&& service apache2 restart;
# XDEBUG
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& docker-php-ext-enable xdebug;
WORKDIR /var/www/comparison