forked from neo4j-php/neo4j-php-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 1.15 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
FROM php:7.4-cli
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libzip-dev \
zip \
unzip \
git \
wget \
&& docker-php-ext-install -j$(nproc) gd sockets bcmath \
&& pecl install ds pcov \
&& docker-php-ext-enable ds \
&& wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 \
&& mv test-reporter-latest-linux-amd64 /usr/bin/cc-test-reporter \
&& chmod +x /usr/bin/cc-test-reporter
ARG WITH_XDEBUG=false
RUN if [ $WITH_XDEBUG = "true" ] ; then \
pecl install channel://pecl.php.net/xdebug-2.9.3; \
docker-php-ext-enable xdebug; \
fi;
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
WORKDIR /opt/project
COPY composer.json composer.lock phpunit.xml.dist phpunit.coverage.xml.dist psalm.xml .php_cs ./
COPY src/ src/
COPY tests/ tests/
COPY tools/ tools/
COPY .git/ .git/
RUN composer install && \
composer install --working-dir=tools/php-cs-fixer && \
composer install --working-dir=tools/psalm