File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG PHP_VERSION
2+ FROM bref/build-php-$PHP_VERSION AS ext
3+
4+ # Fix library path
5+ ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH
6+
7+ # Install packages
8+ RUN yum install -y gmp-devel
9+
10+ # Build PHP extension
11+ WORKDIR /tmp/build/php/ext/gmp
12+ RUN phpize && \
13+ ./configure \
14+ --build=x86_64-pc-linux-gnu \
15+ --prefix=${INSTALL_DIR} \
16+ --enable-option-checking=fatal
17+
18+ RUN make -j $(nproc) install
19+ RUN cp /opt/bref/lib/php/extensions/no-debug-zts-*/gmp.so /tmp/gmp.so
20+
21+ # Build the final image from the lambci image that is close to the production environment
22+ FROM lambci/lambda:provided
23+
24+ # Copy things we installed to the final image
25+ COPY --from=ext /usr/include/gmp-mparam-x86_64.h /opt/bref/include/gmp-mparam-x86_64.h
26+ COPY --from=ext /usr/include/gmp-mparam.h /opt/bref/include/gmp-mparam.h
27+ COPY --from=ext /usr/include/gmp-x86_64.h /opt/bref/include/gmp-x86_64.h
28+ COPY --from=ext /usr/include/gmp.h /opt/bref/include/gmp.h
29+ COPY --from=ext /usr/include/gmpxx.h /opt/bref/include/gmpxx.h
30+
31+ COPY --from=ext /usr/lib64/libgmp.so /opt/bref/lib64/libgmp.so
32+ COPY --from=ext /usr/lib64/libgmpxx.so /opt/bref/lib64/libgmpxx.so
33+
34+ COPY --from=ext /tmp/gmp.so /opt/bref-extra/gmp.so
You can’t perform that action at this time.
0 commit comments