mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Tests - Docker - install vim, add custom php.ini, add "vendor/bin" to the $PATH global variable
This commit is contained in:
@@ -5,6 +5,7 @@ FROM php:5.6-cli
|
|||||||
#
|
#
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
vim \
|
||||||
git \
|
git \
|
||||||
zip \
|
zip \
|
||||||
unzip \
|
unzip \
|
||||||
@@ -14,7 +15,7 @@ RUN apt-get update \
|
|||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
#
|
#
|
||||||
# PHP Extensions
|
# PHP extensions
|
||||||
#
|
#
|
||||||
RUN docker-php-ext-install \
|
RUN docker-php-ext-install \
|
||||||
zip \
|
zip \
|
||||||
@@ -23,10 +24,12 @@ RUN docker-php-ext-install \
|
|||||||
|
|
||||||
#
|
#
|
||||||
# PHP configuration:
|
# PHP configuration:
|
||||||
|
# - default configuration
|
||||||
# - timezone
|
# - timezone
|
||||||
#
|
#
|
||||||
|
COPY php.ini /usr/local/etc/php/php.ini
|
||||||
ARG TIMEZONE
|
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
|
# Xdebug
|
||||||
@@ -52,3 +55,10 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
|||||||
&& php -r "unlink('composer-setup.php');" \
|
&& php -r "unlink('composer-setup.php');" \
|
||||||
&& composer global require --no-plugins --no-scripts hirak/prestissimo \
|
&& composer global require --no-plugins --no-scripts hirak/prestissimo \
|
||||||
&& rm -rf /root/.composer/cache/*
|
&& 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
|
||||||
|
|||||||
3
.docker/config/php.ini
Normal file
3
.docker/config/php.ini
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
display_errors = On
|
||||||
|
display_startup_errors = On
|
||||||
|
error_reporting = E_ALL
|
||||||
Reference in New Issue
Block a user