-
Notifications
You must be signed in to change notification settings - Fork 22
/
dockerfile.buildphp
48 lines (40 loc) · 1011 Bytes
/
dockerfile.buildphp
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
# Compile PHP with static linked dependencies
# to create a single running binary
# Lambda is based on 2017.03
# * don't grab the latest revion of the amazonlinux image.
FROM amazonlinux:2017.03
ARG PHP_VERSION
# Lambda is based on 2017.03
# * dont' grab the latest revisions of development packages.
RUN yum --releasever=2017.03 install \
autoconf \
automake \
libtool \
bison \
re2c \
libxml2-devel \
openssl-devel \
libpng-devel \
libjpeg-devel \
curl-devel -y
RUN curl -sL https://github.com/php/php-src/archive/$PHP_VERSION.tar.gz | tar -zxv
WORKDIR /php-src-$PHP_VERSION
RUN ./buildconf --force
RUN ./configure \
--enable-static=yes \
--enable-shared=no \
--disable-all \
--enable-hash \
--enable-json \
--enable-libxml \
--enable-mbstring \
--enable-phar \
--enable-soap \
--enable-xml \
--with-curl \
--with-gd \
--with-zlib \
--with-openssl \
--without-pear \
--enable-ctype
RUN make -j 5