This repository was archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (41 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
47 lines (41 loc) · 1.43 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
FROM php:7.2-fpm
# Setup Debian
RUN apt-get upgrade && apt-get update && ACCEPT_EULA=Y && apt-get install -y \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmemcached-dev \
libgeoip-dev \
libxml2-dev \
libxslt-dev \
libtidy-dev \
libaio1 \
apt-file \
wget \
vim \
gnupg \
gnupg2 \
git
# Install PECLs
RUN pecl channel-update pecl.php.net \
&& pecl install redis \
&& pecl install geoip-1.1.1 \
&& pecl install apcu \
&& pecl install memcached \
&& pecl install timezonedb
# Install and activate extensions
RUN docker-php-ext-install -j$(nproc) calendar iconv bcmath xml gd mbstring pdo tidy gettext intl pdo pdo_mysql mysqli simplexml tokenizer xml xsl xmlwriter zip opcache exif \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-enable redis geoip apcu memcached timezonedb
# Install Composer
RUN mkdir -p /usr/local/ssh
COPY scripts/* /usr/local/ssh/
RUN sh /usr/local/ssh/install-composer.sh
RUN mv composer.phar /usr/local/bin/composer
# Add PHPInfo file to webroot
RUN echo "<?php echo phpinfo(); ?>" > /var/www/html/phpinfo.php
# Make production ready
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY etc/php/production.ini /usr/local/etc/php/conf.d/production.ini