This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 8
8
# Same AL version as Lambda execution environment AMI
9
9
FROM amazonlinux:2017.03.1.20170812 as builder
10
10
11
+ # Set desired PHP Version
12
+ ARG php_version="7.3.3"
13
+
11
14
# Lock to 2017.03 release (same as Lambda) and install compilation dependencies
12
15
RUN sed -i 's;^releasever.*;releasever=2017.03;;' /etc/yum.conf && \
13
16
yum clean all && \
14
17
yum install -y autoconf \
15
18
bison \
19
+ bzip2-devel \
16
20
gcc \
17
21
gcc-c++ \
18
- make \
22
+ git \
23
+ gzip \
19
24
libcurl-devel \
20
25
libxml2-devel \
26
+ make \
21
27
openssl-devel \
22
28
tar \
23
- gzip \
24
- zip \
25
29
unzip \
26
- git
30
+ zip
27
31
28
- # Download the PHP 7.3.0 source, compile, and install both PHP and Composer
29
- RUN curl -sL https://github.com/php/php-src/archive/php-7.3.0 .tar.gz | tar -xvz && \
30
- cd php-src-php-7.3.0 && \
32
+ # Download the PHP source, compile, and install both PHP and Composer
33
+ RUN curl -sL https://github.com/php/php-src/archive/php-${php_version} .tar.gz | tar -xvz && \
34
+ cd php-src-php-${php_version} && \
31
35
./buildconf --force && \
32
- ./configure --prefix=/opt/php-7-bin/ --with-openssl --with-curl --with-zlib --without-pear && \
36
+ ./configure --prefix=/opt/php-7-bin/ --with-openssl --with-curl --with-zlib --without-pear --enable-bcmath --with-bz2 --enable-mbstring --with-mysqli && \
33
37
make install && \
34
38
/opt/php-7-bin/bin/php -v && \
35
39
curl -sS https://getcomposer.org/installer | /opt/php-7-bin/bin/php -- --install-dir=/opt/php-7-bin/bin/ --filename=composer
You can’t perform that action at this time.
0 commit comments