This repository was archived by the owner on Nov 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
109 lines (85 loc) · 4.42 KB
/
Dockerfile
File metadata and controls
109 lines (85 loc) · 4.42 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
FROM php:7.4-apache
RUN a2enmod rewrite
# install the PHP extensions we need
RUN apt-get update && apt-get install -y gnupg libpng-dev libjpeg-dev libpq-dev default-mysql-client git libbz2-dev libonig-dev
RUN apt-get update && apt-get install -y libgmp-dev libxml2-dev acl unzip bc bzip2 wget libzip-dev libxslt-dev libmagickwand-dev
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
RUN rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-jpeg --with-freetype
RUN docker-php-ext-install gd mbstring pdo pdo_mysql pdo_pgsql zip bcmath bz2 gmp soap xsl intl calendar
RUN pecl install imagick && docker-php-ext-enable imagick
RUN pecl install pcov && docker-php-ext-enable pcov
RUN echo 'sendmail_path=/bin/true' > /usr/local/etc/php/conf.d/sendmail.ini
#install phantomjs
RUN apt-get update && apt-get install -y build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 \
&& wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs \
&& chmod +x /usr/local/bin/phantomjs
#install latest chrome
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update && apt-get install -y google-chrome-stable
#install chromedriver
RUN CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` \
&& wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/ \
&& unzip ~/chromedriver_linux64.zip -d ~/ \
&& rm ~/chromedriver_linux64.zip \
&& mv -f ~/chromedriver /usr/local/bin/chromedriver \
&& chmod 0755 /usr/local/bin/chromedriver
#install phan dependencies
RUN git clone https://github.com/nikic/php-ast.git \
&& cd php-ast \
&& phpize \
&& ./configure \
&& make install \
&& echo 'extension=ast.so' > /usr/local/etc/php/conf.d/ast.ini \
&& cd .. \
&& rm php-ast -rf
# Register the COMPOSER_HOME environment variable
ENV COMPOSER_HOME /composer
# Add global binary directory to PATH and make sure to re-export it
ENV PATH ./vendor/bin:/composer/vendor/bin:$PATH
# Allow Composer to be run as root
ENV COMPOSER_ALLOW_SUPERUSER 1
# Install composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php
#allows for parallel composer downloads
RUN composer global require "hirak/prestissimo:^0.3"
RUN wget -c https://phpmd.org/static/latest/phpmd.phar \
&& chmod +x phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd
RUN wget https://github.com/smmccabe/phpdebt/releases/download/1.0.2/phpdebt.phar \
&& chmod +x phpdebt.phar \
&& mv phpdebt.phar /usr/local/bin/phpdebt
RUN wget https://phar.phpunit.de/phploc.phar \
&& chmod +x phploc.phar \
&& mv phploc.phar /usr/local/bin/phploc
RUN composer global require sebastian/phpcpd
# Readme check
RUN wget https://raw.githubusercontent.com/smmccabe/readmecheck/master/readmecheck \
&& chmod +x readmecheck \
&& mv readmecheck /usr/local/bin/readmecheck
# Node
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs
# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install yarn
# Install SensioLabs' security advisories checker
RUN curl -sL http://get.sensiolabs.org/security-checker.phar -o security-checker.phar \
&& chmod +x security-checker.phar \
&& mv security-checker.phar /usr/local/bin/security-checker
RUN curl -sS https://platform.sh/cli/installer | php
# Install shellcheck utility.
RUN SCVERSION="stable" \
&& apt-get install xz-utils \
&& curl -sLO https://github.com/koalaman/shellcheck/releases/download/${SCVERSION?}/shellcheck-${SCVERSION?}.linux.x86_64.tar.xz \
&& tar -xJvf shellcheck-${SCVERSION}.linux.x86_64.tar.xz \
&& mv "shellcheck-${SCVERSION}/shellcheck" /usr/local/bin/ \
&& rm -rf "shellcheck-${SCVERSION}"
RUN npm -g install smmccabe/commercebot
RUN apt-get update && apt-get install -y rsync