This repository has been archived by the owner on Sep 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
79 lines (68 loc) · 2.26 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
FROM php:7.2
MAINTAINER Krzysztof Kawalec <kf.kawalec@gmail.com>
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
openssh-client \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libcurl4-openssl-dev \
libldap2-dev \
libicu-dev \
libc-client-dev \
libkrb5-dev \
libmagickwand-dev --no-install-recommends \
curl \
libtidy* \
mysql-client \
gnupg \
git \
rsync \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
RUN docker-php-ext-install \
mbstring \
curl \
json \
pdo_mysql \
exif \
tidy \
zip \
opcache \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
&& docker-php-ext-install ldap \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# Xdebug
RUN pecl install -o -f xdebug \
&& rm -rf /tmp/* \
&& docker-php-ext-enable xdebug
RUN echo "memory_limit=-1" > $PHP_INI_DIR/conf.d/memory-limit.ini \
&& echo "date.timezone=Europe/Warsaw" > $PHP_INI_DIR/conf.d/date_timezone.ini
# NodeJS
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean
VOLUME /root/composer
ENV COMPOSER_HOME /root/composer
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer selfupdate
WORKDIR /tmp
# Run phpunit installation
RUN composer require "phpunit/phpunit=5.*" --prefer-source --no-interaction \
&& ln -s /tmp/vendor/bin/phpunit /usr/local/bin/phpunit
# Run codesniffer installation
RUN composer require "squizlabs/php_codesniffer=*" --prefer-source --no-interaction \
&& ln -s /tmp/vendor/bin/phpcs /usr/local/bin/phpcs
RUN php --version \
&& composer --version \
&& phpunit --version \
&& phpcs --version