From 4613a63f029ff660a06967293fde1ee649ef75a9 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Fri, 20 Oct 2017 00:03:38 +0200 Subject: [PATCH] Tests - Docker - install vim, add custom php.ini, add "vendor/bin" to the $PATH global variable --- .docker/config/Dockerfile | 14 ++++++++++++-- .docker/config/php.ini | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .docker/config/php.ini diff --git a/.docker/config/Dockerfile b/.docker/config/Dockerfile index a86861d..cb2d05c 100644 --- a/.docker/config/Dockerfile +++ b/.docker/config/Dockerfile @@ -5,6 +5,7 @@ FROM php:5.6-cli # RUN apt-get update \ && apt-get install -y --no-install-recommends \ + vim \ git \ zip \ unzip \ @@ -14,7 +15,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # -# PHP Extensions +# PHP extensions # RUN docker-php-ext-install \ zip \ @@ -23,10 +24,12 @@ RUN docker-php-ext-install \ # # PHP configuration: +# - default configuration # - timezone # +COPY php.ini /usr/local/etc/php/php.ini ARG TIMEZONE -RUN echo "date.timezone = $TIMEZONE" >> /usr/local/etc/php/php.ini +RUN echo "\n""date.timezone = $TIMEZONE""\n" >> /usr/local/etc/php/php.ini # # Xdebug @@ -52,3 +55,10 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ && php -r "unlink('composer-setup.php');" \ && composer global require --no-plugins --no-scripts hirak/prestissimo \ && rm -rf /root/.composer/cache/* + +# +# Bash +# +RUN sed -i 's/^# export/export/g' /root/.bashrc \ + && sed -i 's/^# alias/alias/g' /root/.bashrc \ + && echo "\n"'export PATH=/project/vendor/bin:$PATH'"\n" >> /root/.bashrc diff --git a/.docker/config/php.ini b/.docker/config/php.ini new file mode 100644 index 0000000..b984c5d --- /dev/null +++ b/.docker/config/php.ini @@ -0,0 +1,3 @@ +display_errors = On +display_startup_errors = On +error_reporting = E_ALL