-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
executable file
·82 lines (71 loc) · 1.82 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Compile PHP with static linked dependencies
# to create a single running binary
FROM amazonlinux
ARG PHP_VERSION
RUN yum install \
autoconf \
automake \
libtool \
wget \
git \
m4 \
re2c \
libxml2-devel \
openssl-devel \
libpng-devel \
libjpeg-devel \
mysql \
curl-devel -y
# need this specific version to build php < 5.5
RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz
RUN tar -xvzf bison-2.6.4.tar.gz
WORKDIR /bison-2.6.4
RUN ./configure
RUN make
RUN make install
WORKDIR /
RUN rm -rf bison-*
RUN curl -sL https://github.com/php/php-src/archive/$PHP_VERSION.tar.gz | tar -zxv
WORKDIR /php-src-$PHP_VERSION
RUN git clone https://github.com/ZeWaren/pecl-apd.git
RUN mv pecl-apd ext/apd
RUN ./buildconf --force
RUN ./configure \
--enable-static=yes \
--enable-shared=no \
--disable-all \
--enable-apd \
--enable-dom \
--enable-filter \
--enable-hash \
--enable-json \
--enable-libxml \
--enable-mbstring \
--enable-phar \
--enable-pdo \
--enable-simplexml \
--enable-soap \
--enable-xml \
--enable-xmlwriter \
--enable-zip \
--with-curl \
--with-gd \
--with-iconv \
--with-mysql \
--with-mysqli \
--with-pdo-mysql \
--with-xmlrpc \
--with-zlib \
--with-openssl \
--without-pear \
--enable-ctype \
--enable-fileinfo
RUN make -j 5
RUN cp ./sapi/cli/php /usr/bin/
# for debugging inside container via serverless invoke local OR
# $>php handler.php '{"path":"/wp-admin/","httpMethod":"GET","headers":{"Host":"www.domain.com"},"queryStringParameters":null}'
#RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
#RUN yum install -y nodejs
#RUN npm install -g serverless serverless-domain-manager
VOLUME /app
WORKDIR /app