Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (46 sloc) 1.79 KB
FROM php:7.0-apache
# PHP extension
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libxslt1-dev
RUN docker-php-ext-configure \
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install \
gd \
intl \
mbstring \
mcrypt \
pdo_mysql \
xsl \
zip \
soap \
bcmath
# Xdebug stuff
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y \
&& apt-get install -y git libmcrypt-dev libpng12-dev libjpeg-dev libpq-dev mysql-client curl \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install mcrypt gd mbstring pdo pdo_mysql zip \
&& pecl install xdebug \
&& rm -rf /tmp/pear \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port=9000\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Apache & PHP configuration
RUN a2enmod rewrite
ADD apache/vhost.conf /etc/apache2/sites-enabled/default.conf
ADD apache/start_safe_perms /start_safe_perms
ADD apache/run.sh /run.sh
ADD php/php.ini /usr/local/etc/php/php.ini
#USER www-data
# Install composer
#RUN curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/bin/composer
#RUN chown -R www-data:www-data /var/www/
CMD ["/run.sh"]