Dockerfile
FROM centos:6.7
MAINTAINER Thyago Luciano <thyagoluciano@gmail.com>
# Instalar httpd e php
RUN yum install -y php-5.3.3 php-devel-5.3.3
RUN yum install -y php-mysql php-mbstring php-soap
RUN yum install -y gcc gcc-c++ autoconf automake tar wget nano
# Update the PHP.ini file, enable <? ?> tags and quieten logging.
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php.ini
RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php.ini
# centos update
RUN yum update -y \
&& mkdir -p /etc/httpd/virtualhost \
&& mkdir -p /etc/ssl/certs
# Adicionar arquivos e diretorios
ADD certs/ /etc/ssl/certs/
ADD run-httpd.sh /run-httpd.sh
RUN chmod -v +x /run-httpd.sh
# Instalar Xdebug
RUN cd /tmp \
&& wget https://xdebug.org/files/xdebug-2.2.7.tgz \
&& tar xfz xdebug-2.2.7.tgz \
&& mv xdebug-2.2.7 /usr/src \
&& cd /usr/src/xdebug-2.2.7 \
&& phpize \
&& ./configure --enable-xdebug \
&& make \
&& make install \
&& echo "zend_extension=$(find /usr/lib64/php/modules/ -name xdebug.so)" > /etc/php.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /etc/php.d/xdebug.ini \
&& echo "xdebug.remote_port = 9100" >> /etc/php.d/xdebug.ini \
&& echo "xdebug.remote_handler='dbgp'" >> /etc/php.d/xdebug.ini \
&& echo "xdebug.remote_host='192.168.181.5' " >> /etc/php.d/xdebug.ini \
&& echo "xdebug.remote_enable = on" >> /etc/php.d/xdebug.ini
EXPOSE 80
CMD ["/run-httpd.sh"]