-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
100 lines (85 loc) · 2.96 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
FROM php:7.1-apache
ENV DEBIAN_FRONTEND noninteractive
ENV DRUSH_LAUNCHER_VERSION 0.4.3
ADD bin/docker-php-pecl-install /usr/local/bin/
RUN apt-get update && apt-get install -y \
git \
imagemagick \
libcurl4-openssl-dev \
libfreetype6-dev \
libjpeg-turbo-progs \
libjpeg62-turbo-dev \
libpng-dev \
libxml2-dev \
mysql-client \
pngquant \
python \
ssmtp \
sudo \
unzip \
wget \
zlib1g-dev \
libldb-dev \
libldap2-dev
RUN ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
RUN docker-php-ext-install \
bcmath \
curl \
exif \
mbstring \
mysqli \
opcache \
pcntl \
pdo_mysql \
soap \
zip \
ldap \
&& apt-get clean && apt-get autoremove -q \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/* \
&& a2enmod deflate expires headers mime rewrite proxy proxy_http ssl \
&& a2dissite 000-default \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& echo "sendmail_path = /usr/sbin/ssmtp -t" > /usr/local/etc/php/conf.d/conf-sendmail.ini \
&& echo "date.timezone='Europe/Paris'\n" > /usr/local/etc/php/conf.d/conf-date.ini
# Install Uploadprogress
RUN git clone https://git.php.net/repository/pecl/php/uploadprogress.git \
&& cd uploadprogress \
&& phpize \
&& ./configure \
&& make && make install \
&& cd .. \
&& rm -rf uploadprogress \
&& echo "extension=uploadprogress.so" > /usr/local/etc/php/conf.d/conf-uploadprogress.ini
# Install PhpRedis.
RUN git clone https://github.com/phpredis/phpredis.git \
&& cd phpredis \
&& phpize \
&& ./configure \
&& make && make install \
&& cd .. \
&& rm -rf phpredis \
&& echo "extension=redis.so" > /usr/local/etc/php/conf.d/conf-redis.ini
# Install Composer.
RUN cd /usr/local \
&& curl -sS https://getcomposer.org/installer | php \
&& chmod +x /usr/local/composer.phar \
&& ln -s /usr/local/composer.phar /usr/local/bin/composer \
&& echo 'PATH="$HOME/.composer/vendor/bin:$PATH"' >> $HOME/.bashrc \
&& echo 'export COMPOSER_ALLOW_SUPERUSER=1' >> $HOME/.bashrc
# Install Drush Launcher.
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/$DRUSH_LAUNCHER_VERSION/drush.phar \
&& chmod +x drush.phar \
&& mv drush.phar /usr/local/bin/drush \
&& drush self-update
# Install hirak/prestissimo
RUN composer global require "hirak/prestissimo" --prefer-dist --no-progress --no-suggest --classmap-authoritative
RUN composer clear-cache
# Add some bash aliases.
RUN echo 'alias ll="ls -l"' >> $HOME/.bashrc \
&& echo 'alias lll="ls -al"' >> $HOME/.bashrc
WORKDIR /project/
COPY ./bin/entrypoint.sh /bin/
RUN chmod a+x /bin/entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]
CMD ["apache2-foreground"]