forked from apparena/docker-php7-xdebug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (48 loc) · 1.42 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM php:7.0-apache
# Install PHP extensions
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get update && apt-get install -y \
libicu-dev \
libpq-dev \
libmcrypt-dev \
mysql-client \
libmysqlclient-dev \
ruby-full \
nodejs \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-install \
intl \
mbstring \
mcrypt \
mysqli \
pcntl \
pdo_mysql \
pdo_pgsql \
pgsql \
zip \
opcache
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# SASS compiler
RUN su -c "gem install sass"
# Install Xdebug
RUN curl -fsSL 'https://xdebug.org/files/xdebug-2.4.0.tgz' -o xdebug.tar.gz \
&& mkdir -p xdebug \
&& tar -xf xdebug.tar.gz -C xdebug --strip-components=1 \
&& rm xdebug.tar.gz \
&& ( \
cd xdebug \
&& phpize \
&& ./configure --enable-xdebug \
&& make -j$(nproc) \
&& make install \
) \
&& rm -r xdebug \
&& docker-php-ext-enable xdebug
# Put apache config
COPY build/apache-vhost.conf /etc/apache2/sites-available/custom-vhost.conf
RUN a2dissite 000-default.conf && a2ensite custom-vhost.conf && a2enmod rewrite
# Change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
WORKDIR /var/www/html