1- FROM andrewholgate/drupal-php70:0.3 .0
1+ FROM andrewholgate/drupal-php70:0.4 .0
22MAINTAINER Andrew Holgate <
[email protected] >
33
44RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
@@ -8,46 +8,39 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
88RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python-sphinx python-pip doxygen && \
99 DEBIAN_FRONTEND=noninteractive pip install sphinx_rtd_theme breathe
1010
11- # Install XDebug 2.4.0 RC3
12- RUN wget https://github.com/xdebug/xdebug/archive/XDEBUG_2_4_0RC3.tar.gz && \
13- tar zxvf XDEBUG_2_4_0RC3.tar.gz && \
14- rm -f XDEBUG_2_4_0RC3.tar.gz && \
15- cd xdebug-XDEBUG_2_4_0RC3 && \
11+ # XML needed by PHPCodeSniffer 2.3+ and other developer tools.
12+ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install php7.0-xml
13+
14+ # Install XDebug 2.4.0
15+ RUN wget https://github.com/xdebug/xdebug/archive/XDEBUG_2_4_0RC4.tar.gz && \
16+ tar zxvf XDEBUG_2_4_0RC4.tar.gz && \
17+ rm -f XDEBUG_2_4_0RC4.tar.gz && \
18+ cd xdebug-XDEBUG_2_4_0RC4 && \
1619 phpize && \
1720 ./configure --enable-xdebug && \
1821 make && \
1922 cp modules/xdebug.so /usr/lib/php/20151012/ && \
20- rm -Rf ../xdebug-XDEBUG_2_4_0RC3
23+ rm -Rf ../xdebug-XDEBUG_2_4_0RC4
2124
2225COPY xdebug.ini /etc/php/mods-available/xdebug.ini
23- RUN ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.0/cli/conf.d/20-xdebug.ini
2426RUN ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.0/fpm/conf.d/20-xdebug.ini
27+ COPY xdebug /usr/local/bin/xdebug
28+ RUN chmod +x /usr/local/bin/xdebug
29+
2530# Symlink log files.
2631RUN ln -s /var/log/xdebug/xdebug.log /var/www/log/
2732
28- # Install XHProf
29- # RUN wget https://github.com/phacility/xhprof/archive/master.tar.gz && \
30- # tar zxvf master.tar.gz && \
31- # rm -f master.tar.gz
32- # cd xhprof-master/extension/ && \
33- # phpize && \
34- # ./configure --with-php-config=/usr/bin/php-config7.0 && \
35- # make && \
36- # make install && \
37- # make test && \
38- # rm -Rf ../xhprof-master
39-
4033# Install JRE (needed for some testing tools like sitespeed.io) and libs for PhantomJS.
4134RUN DEBIAN_FRONTEND=noninteractive apt-get -y install default-jre libfreetype6 libfontconfig
4235
43- # Install Node 4.2.4 LTS
36+ # Install Node 4.3.1 LTS
4437RUN cd /opt && \
45- wget https://nodejs.org/dist/v4.2.4 /node-v4.2.4 -linux-x64.tar.gz && \
46- tar -xzf node-v4.2.4 -linux-x64.tar.gz && \
47- mv node-v4.2.4 -linux-x64 node && \
38+ wget https://nodejs.org/dist/v4.3.1 /node-v4.3.1 -linux-x64.tar.gz && \
39+ tar -xzf node-v4.3.1 -linux-x64.tar.gz && \
40+ mv node-v4.3.1 -linux-x64 node && \
4841 cd /usr/local/bin && \
4942 ln -s /opt/node/bin/* . && \
50- rm -f /opt/node-v4.2.4 -linux-x64.tar.gz
43+ rm -f /opt/node-v4.3.1 -linux-x64.tar.gz
5144
5245USER ubuntu
5346RUN echo 'export PATH="$PATH:$HOME/.npm-packages/bin"' >> ~/.bashrc && \
@@ -66,6 +59,19 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install imagemagick && \
6659# Front-end tools
6760RUN npm install -g phantomjs
6861
62+ # Install XHProf
63+ RUN wget https://github.com/RustJason/xhprof/archive/php7.tar.gz && \
64+ tar zxvf php7.tar.gz && \
65+ rm -f php7.tar.gz && \
66+ cd xhprof-php7/extension/ && \
67+ phpize && \
68+ ./configure --with-php-config=/usr/bin/php-config7.0 && \
69+ make && \
70+ sudo make install && \
71+ rm -Rf ../xhprof-php7
72+ # Tests fail:
73+ # make test && \
74+
6975# Turn on PHP error reporting
7076RUN sed -ri 's/^display_errors\s *=\s *Off/display_errors = On/g' /etc/php/7.0/fpm/php.ini && \
7177 sed -ri 's/^display_errors\s *=\s *Off/display_errors = On/g' /etc/php/7.0/cli/php.ini && \
@@ -76,7 +82,9 @@ RUN sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php/7.0/fpm
7682 sed -ri 's/^track_errors\s *=\s *Off/track_errors = On/g' /etc/php/7.0/fpm/php.ini && \
7783 sed -ri 's/^track_errors\s *=\s *Off/track_errors = On/g' /etc/php/7.0/cli/php.ini && \
7884 sed -ri 's/^;xmlrpc_errors\s *=\s *0/xmlrpc_errors = 1/g' /etc/php/7.0/fpm/php.ini && \
79- sed -ri 's/^;xmlrpc_errors\s *=\s *0/xmlrpc_errors = 1/g' /etc/php/7.0/cli/php.ini
85+ sed -ri 's/^;xmlrpc_errors\s *=\s *0/xmlrpc_errors = 1/g' /etc/php/7.0/cli/php.ini && \
86+ sed -ri 's/^zend.assertions\s *=\s *-1/zend.assertions = 1/g' /etc/php/7.0/fpm/php.ini && \
87+ sed -ri 's/^zend.assertions\s *=\s *-1/zend.assertions = 1/g' /etc/php/7.0/cli/php.ini
8088
8189# Disable Google Pagespeed
8290RUN sed -ri 's/\s *ModPagespeed on/ ModPagespeed off/g' /etc/apache2/mods-available/pagespeed.conf
@@ -86,10 +94,18 @@ RUN apt-get -y install sudo && \
8694 echo "ubuntu ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
8795 usermod -a -G sudo ubuntu
8896
97+ # Load custom .bashrc settings if available.
98+ USER ubuntu
99+ RUN echo 'LOCAL_BASHRC="$HOME/.local/bashrc"; test -f "${LOCAL_BASHRC}" && source "${LOCAL_BASHRC}"' >> ~/.bashrc
100+ USER root
101+
89102# Clean-up installation.
90103RUN DEBIAN_FRONTEND=noninteractive apt-get -y autoclean && \
91104 DEBIAN_FRONTEND=noninteractive apt-get -y autoremove
92105
106+ # Apache does not like PID files pre-existing
107+ RUN rm -f /var/run/apache2/apache2.pid
108+
93109RUN service apache2 restart
94110RUN service php7.0-fpm start
95111
0 commit comments