Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM alpine:3.8
- RUN apk add --no-cache \
- alpine-sdk \
- autoconf \
- automake \
- file \
- flex \
- libressl-dev \
- libtool \
- re2c
- ENV PHP_VERSION=7.2.8
- RUN cd /tmp \
- && curl -OsS http://php.net/distributions/php-${PHP_VERSION}.tar.gz \
- && tar zxof php-${PHP_VERSION}.tar.gz
- ENV CFLAGS="-O3 -march=x86-64"
- ENV LDFLAGS="-s -static"
- RUN cd /tmp/php-${PHP_VERSION} \
- && ./configure \
- EXTENSION_DIR="/usr/lib/php" \
- --prefix=/usr \
- --sysconfdir=/etc/php/cli \
- --with-config-file-path=/etc/php/cli \
- --with-config-file-scan-dir=/etc/php/cli/conf.d \
- --enable-static=yes \
- --enable-shared=no \
- --disable-all \
- --with-openssl \
- --enable-cli \
- --disable-fpm \
- --disable-cgi \
- --disable-phpdbg \
- && make -j$(grep "cpu cores" /proc/cpuinfo | wc -l) \
- && make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement