Tests - use Docker (as environment guard)

This commit is contained in:
Meritoo
2017-10-18 00:31:18 +02:00
parent 71e1eeb81b
commit b824808cd4
5 changed files with 74 additions and 0 deletions

42
.docker/config/Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
FROM php:5.6-cli
#
# Tools & libraries
#
RUN apt-get update && apt-get install -y \
libicu-dev
#
# PHP Extensions
#
RUN docker-php-ext-install \
intl
#
# Timezone
#
ARG TIMEZONE
RUN echo "date.timezone = $TIMEZONE" >> /usr/local/etc/php/php.ini
#
# Xdebug
#
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
#
# Phing
#
RUN pear channel-discover pear.phing.info \
&& pear install [--alldeps] phing/phing
#
# Composer
#
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === \
'544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo \
'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"

View File

@@ -0,0 +1,7 @@
[xdebug]
zend_extension='xdebug.so'
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.idekey='PHPSTORM'
xdebug.remote_port=9001