This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
81 lines (68 loc) · 2.34 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM php:7.1-cli-stretch
RUN apt-get update \
&& set -xe \
&& apt-get install -y \
automake \
libtool \
libpng-dev \
libssl-dev \
libcurl4-openssl-dev \
pkg-config \
libedit-dev \
libxml2-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
wget \
curl \
git \
unzip \
libmcrypt-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
bcmath \
mcrypt \
intl \
zip \
pdo_mysql \
opcache \
soap \
sockets \
iconv \
&& pecl install xdebug redis \
&& docker-php-ext-enable redis \
&& rm -rf /tmp/pear ~/.pearrc /var/tmp/* /tmp/*
RUN { \
echo '#!/bin/sh'; \
echo '/usr/local/bin/php -dzend_extension=xdebug.so "$@"'; \
} > /usr/local/bin/php-xdebug \
&& chmod +x /usr/local/bin/php-xdebug
COPY --from=composer:2.2 /usr/bin/composer /usr/bin/composer
RUN composer global require \
phpmd/phpmd \
pdepend/pdepend \
phpstan/phpstan \
phpstan/phpstan-doctrine \
phpstan/phpstan-phpunit \
phpstan/phpstan-symfony \
--prefer-dist --no-interaction \
&& rm -rf /root/.composer/cache/*
RUN wget -c https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar -O /usr/local/bin/phpcs \
&& chmod a+x /usr/local/bin/phpcs
RUN wget -c https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar -O /usr/local/bin/phpcbf \
&& chmod a+x /usr/local/bin/phpcbf
RUN mkdir -p /usr/local/etc/phpcs \
&& git clone git://github.com/escapestudios/Symfony2-coding-standard.git /usr/local/etc/phpcs/Symfony2-coding-standard \
&& /usr/local/bin/phpcs --config-set installed_paths /usr/local/etc/phpcs/Symfony2-coding-standard
RUN wget -c https://phar.phpunit.de/phpcpd.phar -O /usr/local/bin/phpcpd \
&& chmod a+x /usr/local/bin/phpcpd
RUN wget -c https://phar.phpunit.de/phploc.phar -O /usr/local/bin/phploc \
&& chmod a+x /usr/local/bin/phploc
RUN wget -c https://cs.symfony.com/download/php-cs-fixer-v2.phar -O /usr/local/bin/php-cs-fixer \
&& chmod a+x /usr/local/bin/php-cs-fixer
RUN cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& sed -i "s/memory_limit\s*=.*/memory_limit=-1/g" "$PHP_INI_DIR/php.ini"
ENV PATH="$PATH:/root/.composer/vendor/bin"
WORKDIR /app