Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit bb5b7ca

Browse files
matthewpoerclareliguori
authored andcommitted
Update PHP Version + add common libraries (#17)
1 parent 80cc1f8 commit bb5b7ca

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

example/Dockerfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,32 @@
88
# Same AL version as Lambda execution environment AMI
99
FROM amazonlinux:2017.03.1.20170812 as builder
1010

11+
# Set desired PHP Version
12+
ARG php_version="7.3.3"
13+
1114
# Lock to 2017.03 release (same as Lambda) and install compilation dependencies
1215
RUN sed -i 's;^releasever.*;releasever=2017.03;;' /etc/yum.conf && \
1316
yum clean all && \
1417
yum install -y autoconf \
1518
bison \
19+
bzip2-devel \
1620
gcc \
1721
gcc-c++ \
18-
make \
22+
git \
23+
gzip \
1924
libcurl-devel \
2025
libxml2-devel \
26+
make \
2127
openssl-devel \
2228
tar \
23-
gzip \
24-
zip \
2529
unzip \
26-
git
30+
zip
2731

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} && \
3135
./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 && \
3337
make install && \
3438
/opt/php-7-bin/bin/php -v && \
3539
curl -sS https://getcomposer.org/installer | /opt/php-7-bin/bin/php -- --install-dir=/opt/php-7-bin/bin/ --filename=composer

0 commit comments

Comments
 (0)