-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
98 lines (88 loc) · 2.71 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
FROM php:7.1-fpm
MAINTAINER Eduardo Ramos <eduardorfreitas93@gmail.com>
# Get repository and install wget and vim
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
vim \
git \
unzip \
gnupg2 \
libpq-dev
# Add PostgreSQL repository
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# Install PHP extensions deps
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
postgresql-server-dev-9.5 \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
zlib1g-dev \
libicu-dev \
g++ \
unixodbc-dev \
libxml2-dev \
libaio-dev \
libmemcached-dev \
freetds-dev \
libssl-dev \
openssl \
libgearman-dev
RUN cd /tmp && \
git clone https://github.com/wcgallego/pecl-gearman.git && \
cd pecl-gearman && \
phpize && \
./configure && \
make && make install && \
rm -rf /tmp/pecl-gearman
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \
--filename=composer
# Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
&& pecl install sqlsrv-4.1.6.1 \
&& pecl install pdo_sqlsrv-4.1.6.1 \
&& pecl install redis \
&& pecl install memcached \
&& docker-php-ext-install \
iconv \
mbstring \
intl \
mcrypt \
gd \
pgsql \
mysqli \
pdo_pgsql \
pdo_mysql \
pdo_dblib \
soap \
sockets \
zip \
pcntl \
ftp \
exif \
bcmath \
&& docker-php-ext-enable \
sqlsrv \
pdo_sqlsrv \
redis \
memcached \
opcache \
gearman.so
# Install APCu and APC backward compatibility
RUN pecl install apcu \
&& pecl install apcu_bc-1.0.3 \
&& docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini
# Clean repository
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \
&& printf '\n\ndate.timezone = "America/Sao_Paulo"' >> /usr/local/etc/php/php.ini \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Volume e área de trabalho
VOLUME ["/var/www/html"]
WORKDIR /var/www/html