-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
85 lines (71 loc) · 1.58 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
FROM ubuntu:16.04
MAINTAINER Jonathan A. Schweder "[email protected]"
RUN apt-get update -y \
&& apt-get upgrade -y
RUN apt-get install \
ca-certificates \
wget \
git \
mercurial \
zip \
make \
autoconf \
build-essential \
bison \
unzip \
ssh \
libxml2-dev \
libbz2-dev \
libmcrypt-dev \
libpq-dev \
libcurl4-openssl-dev \
libedit-dev \
libreadline-dev \
libxslt-dev \
libzip-dev \
libpng12-dev \
pkg-config \
iputils-ping \
--no-install-recommends \
--no-install-suggests \
-y
RUN git clone -b PHP-7.0 --depth 1 git://github.com/php/php-src /usr/src/php
WORKDIR /usr/src/php
RUN ./buildconf
RUN ./configure \
--disable-cgi \
--disable-short-tags \
--enable-bcmath \
--enable-mbstring \
--enable-pcntl \
--enable-maintainer-zts \
--enable-fpm \
--enable-soap \
--enable-libxml \
--enable-zip \
--with-zlib \
--with-xsl \
--with-zlib \
--with-bz2 \
--with-openssl \
--with-mcrypt \
--with-mysqli \
--with-pdo-mysql \
--with-pgsql \
--with-pdo-pgsql \
--with-readline \
--with-curl \
--with-libzip \
--with-gd
RUN make -j$(($(nproc)+1)) \
&& make install
RUN cp ./php.ini-production /usr/local/lib/php.ini \
&& echo "cgi.fix_pathinfo=0" >> /usr/local/lib/php.ini
RUN pecl install redis \
&& echo "extension=redis.so" >> /usr/local/lib/php.ini
RUN rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove \
&& apt-get autoclean
WORKDIR /var/www
VOLUME /var/www
EXPOSE 80 443