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

Commit 159b87e

Browse files
committed
Working PHP compilation
1 parent 0c92204 commit 159b87e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
####### PHP custom runtime #######
2+
3+
# Same AL version as Lambda execution environment AMI
4+
FROM amazonlinux:2017.03.1.20170812 as customruntime
5+
6+
# Lock to 2017.03 release (same as Lambda) and install compilation dependencies
7+
RUN sed -i 's;^releasever.*;releasever=2017.03;;' /etc/yum.conf && \
8+
yum clean all && \
9+
yum install autoconf bison gcc gcc-c++ make libcurl-devel libxml2-devel openssl-devel tar gzip -y
10+
11+
# Download the PHP 7.3.0 source, compile it, and install to /opt/php-7-bin
12+
RUN mkdir ~/php-7-bin && \
13+
curl -sL https://github.com/php/php-src/archive/php-7.3.0.tar.gz | tar -xvz && \
14+
cd php-src-php-7.3.0 && \
15+
./buildconf --force && \
16+
./configure --prefix=/opt/php-7-bin/ --with-openssl --with-curl --with-zlib && \
17+
make install && \
18+
/opt/php-7-bin/bin/php -v
19+
20+
###### Something else ######
21+
22+
FROM lambci/lambda:provided

0 commit comments

Comments
 (0)