-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.ci
109 lines (101 loc) · 3.57 KB
/
Dockerfile.ci
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:5.6-apache
# common-php56
ENV DEBIAN_FRONTEND noninteractive
ENV APACHE_DOCROOT /var/www/html
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_REQUEST_WORKERS 150
ENV PATH=/var/www/vendor/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
# for bz2
bzip2 libbz2-dev \
# for ftp
libssl-dev \
# for gd
libfreetype6-dev libjpeg62-turbo-dev libpng12-dev \
# for intl
libicu-dev \
# for dom
libxml2-dev \
# for ldap
libldap2-dev \
# for mcrypt
libmcrypt-dev \
# for mysql
mysql-client \
# for git
git \
# for ssh client only
openssh-client \
# For image optimization
jpegoptim \
optipng \
pngquant \
# For imagick
imagemagick \
libfftw3-double3 \
# for yaml
libyaml-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
&& docker-php-ext-install -j$(nproc) \
bcmath \
bz2 \
calendar \
exif \
ftp \
gd \
gettext \
intl \
ldap \
mcrypt \
mysql \
mysqli \
opcache \
pcntl \
pdo_mysql \
shmop \
soap \
sockets \
sysvmsg \
sysvsem \
sysvshm \
zip \
&& pecl install redis-2.2.8 apcu-4.0.11 raphf-1.1.2 propro-1.0.2 yaml-1.3.1 \
&& docker-php-ext-enable redis apcu raphf propro yaml \
&& pecl install pecl_http-2.5.6 \
&& docker-php-ext-enable http \
&& printf "upload_max_filesize = 128M\npost_max_size = 128M" > $PHP_INI_DIR/conf.d/00-max_filesize.ini
# Configure Apache:
RUN a2enmod rewrite headers expires \
&& sed -i "/User www-data/c\User \$\{APACHE_RUN_USER\}" /etc/apache2/apache2.conf \
&& sed -i "/Group www-data/c\Group \$\{APACHE_RUN_GROUP\}" /etc/apache2/apache2.conf \
&& sed -i "/DocumentRoot \/var\/www\/html/c\\\tDocumentRoot \$\{APACHE_DOCROOT\}" /etc/apache2/sites-enabled/000-default.conf \
# Preemptively add a user 1000, for use with $APACHE_RUN_USER on osx
&& adduser --uid 1000 --gecos 'My OSX User' --disabled-password osxuser
# Install CLI tools:
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer \
&& mkdir /usr/share/composer \
&& cd /usr/share/composer \
&& composer init --no-interaction && composer config bin-dir /usr/local/bin \
&& rm -r /root/.composer/cache \
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-linux-amd64-v0.6.0.tar.gz | tar -C /usr/local/bin -xzv \
&& chmod +x /usr/local/bin/dockerize \
&& ssh-keyscan github.com >> /etc/ssh/ssh_known_hosts
ADD mpm_prefork.conf /etc/apache2/mods-enabled/mpm_prefork.conf
ADD php.ini.ci $PHP_INI_DIR/conf.d/zz-overrides.ini
ADD scripts/* /usr/local/bin/
CMD ["apache2-foreground-enhanced"]
# /common-php56
# NodeJS,
RUN apt-get update \
&& apt-get install -y apt-transport-https lsb-release > /dev/null 2>&1 \
&& curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo 'deb https://deb.nodesource.com/node_6.x jessie main' > /etc/apt/sources.list.d/nodesource.list \
&& echo 'deb-src https://deb.nodesource.com/node_6.x jessie main' >> /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install nodejs \
&& npm install -g yarn \
&& npm cache clean --force \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*