Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. FROM alpine:3.8
  2.  
  3. RUN apk add --no-cache \
  4. alpine-sdk \
  5. autoconf \
  6. automake \
  7. file \
  8. flex \
  9. libressl-dev \
  10. libtool \
  11. re2c
  12.  
  13. ENV PHP_VERSION=7.2.8
  14.  
  15. RUN cd /tmp \
  16. && curl -OsS http://php.net/distributions/php-${PHP_VERSION}.tar.gz \
  17. && tar zxof php-${PHP_VERSION}.tar.gz
  18.  
  19. ENV CFLAGS="-O3 -march=x86-64"
  20. ENV LDFLAGS="-s -static"
  21.  
  22. RUN cd /tmp/php-${PHP_VERSION} \
  23. && ./configure \
  24. EXTENSION_DIR="/usr/lib/php" \
  25.  
  26. --prefix=/usr \
  27. --sysconfdir=/etc/php/cli \
  28. --with-config-file-path=/etc/php/cli \
  29. --with-config-file-scan-dir=/etc/php/cli/conf.d \
  30.  
  31. --enable-static=yes \
  32. --enable-shared=no \
  33. --disable-all \
  34. --with-openssl \
  35.  
  36. --enable-cli \
  37. --disable-fpm \
  38. --disable-cgi \
  39. --disable-phpdbg \
  40. && make -j$(grep "cpu cores" /proc/cpuinfo | wc -l) \
  41. && make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement