-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.template
executable file
·50 lines (37 loc) · 2.57 KB
/
Dockerfile.template
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
FROM javanile/vtiger:%{version}
RUN apt-get update && apt-get -y upgrade && \
apt-get install -y --no-install-recommends rsync inotify-tools wget zip unzip vim nano iputils-ping libxml2-dev gettext mariadb-client libldap2-dev tidy libtidy-dev libmagick++-dev libmagickwand-dev libpq-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libonig-dev && \
ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so && \
docker-php-ext-install ldap tidy soap && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN ( pecl install -f xdebug-2.8.1 || pecl install -f xdebug-2.7.2 || pecl install -f xdebug-2.5.5 ) && docker-php-ext-enable xdebug
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN curl -sL -o /usr/local/bin/phpcs https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
RUN curl -sL -o /usr/local/bin/phpcbf https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar && chmod +x /usr/local/bin/phpcbf
RUN curl -sLk -o /usr/local/bin/phpmd https://phpmd.org/static/latest/phpmd.phar && chmod +x /usr/local/bin/phpmd
RUN curl https://phar.phpunit.de/phpunit-8.phar -skL -o /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit
RUN curl -sL https://raw.githubusercontent.com/javanile/inotifywait-polling/main/setup.sh | bin=/usr/local/bin/inotifywait-polling bash -
RUN a2enmod proxy_wstunnel
RUN docker-php-ext-install sockets
RUN docker-php-ext-configure pcntl --enable-pcntl && docker-php-ext-install pcntl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg=/usr/include/ --enable-gd
RUN docker-php-ext-install gd
RUN docker-php-ext-enable gd
COPY VtigerTest.php /var/www/html/VtigerTest.php
COPY debug.sh /usr/local/bin/debug
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug-test.php /var/www/html/xdebug-test.php
COPY websocket-test.php /var/www/html/websocket-test.php
RUN apt-get -y update && \
apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN a2enmod proxy_http && a2enmod proxy_wstunnel && a2enmod rewrite
RUN sed -i /etc/apache2/sites-available/000-default.conf -e 's/<\/VirtualHost>/ ProxyPassMatch "\/websocket-(52[0-2][0-9][0-9])" "ws:\/\/0.0.0.0:52000" nocanon\n<\/VirtualHost>/g'
## Intall PCOV
RUN pecl install pcov && docker-php-ext-enable pcov
COPY pcov.sh /usr/local/bin/pcov
RUN chmod +x /usr/local/bin/pcov
## Add phpinfo file
RUN echo "<?php phpinfo();" > /var/www/html/phpinfo.php