forked from hipay/hipay-wallet-cashout-mirakl-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·46 lines (38 loc) · 1.74 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM php:5.6-cli
COPY . /var/www/html
WORKDIR /var/www/html
# Git
RUN apt-get update && apt-get install -y git-all
# PHP Unit
RUN apt-get update && apt-get install -y wget
RUN wget https://phar.phpunit.de/phpunit.phar -O phpunit.phar
RUN chmod +x phpunit.phar
RUN mv phpunit.phar /usr/local/bin/phpunit
#RUN phpunit --version
# zip
RUN buildRequirements="zlib1g-dev" \
&& apt-get update && apt-get install -y ${buildRequirements} \
&& docker-php-ext-install zip \
&& apt-get purge -y ${buildRequirements} \
&& rm -rf /var/lib/apt/lists/*
# soap
RUN buildRequirements="libxml2-dev" \
&& apt-get update && apt-get install -y ${buildRequirements} \
&& docker-php-ext-install soap \
&& apt-get purge -y ${buildRequirements} \
&& rm -rf /var/lib/apt/lists/*
#XDebug
RUN yes | pecl install xdebug-2.5.0 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_connect_back=On" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.profiler_enable=0" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.profiler_output_dir=\"/temp/profiledir\"" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "date.timezone = Europe/Paris" > /usr/local/etc/php/conf.d/date.ini
# composer
RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer -- --install-dir=/usr/local/bin
RUN composer install --no-interaction
RUN chmod 777 tests/phpunit.xml
CMD ["vendor/phpunit/phpunit/phpunit", "-c tests/phpunit.xml"]