-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (46 loc) · 1.4 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
#Lambda base image Amazon linux
FROM public.ecr.aws/lambda/provided
# Set desired PHP Version
ARG php_version="8.2.2"
RUN yum clean all && \
yum install -y autoconf \
bison \
bzip2-devel \
gcc \
gcc-c++ \
git \
gzip \
libcurl-devel \
libxml2-devel \
libzip-devel \
make \
openssl-devel \
tar \
re2c \
sqlite-devel \
zip \
unzip \
php-zip
# Download the PHP source, compile, and install both PHP and Composer
RUN curl -sL https://github.com/php/php-src/archive/refs/tags/php-${php_version}.tar.gz | tar -xvz && \
cd php-src-php-${php_version} && \
./buildconf --force && \
./configure --with-openssl \
--with-onig=/usr/lib64 \
--with-curl \
--with-zlib \
--without-pear \
--with-libzip \
--enable-bcmath \
--enable-zip \
--with-bz2 \
--with-mysqli && \
make -j 5 && \
make install
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
COPY runtime/bootstrap /var/runtime/
COPY src/ /var/task/
# # # Layer 1: PHP Binaries
WORKDIR /var/task/
RUN composer install --no-interaction -vvv
CMD [ "index" ]