Dockerfile 1.4 KB

1234567891011121314151617181920212223
  1. FROM php:8-fpm-alpine
  2. RUN apk update && apk add git autoconf make gcc g++ file gettext-dev icu-dev zlib-dev libpng-dev gmp-dev \
  3. mariadb-dev mariadb-client postgresql-dev postgresql-client vips-dev composer > /dev/null
  4. ARG MAKEFLAGS="-j$(cat /proc/cpuinfo | grep processor | wc -l)"
  5. RUN apk add --virtual .phpize-deps $PHPIZE_DEPS \
  6. && cd /tmp && git clone https://github.com/krakjoe/apcu && cd apcu && phpize && ./configure --enable-apcu && make install \
  7. && cd /tmp && git clone https://github.com/php-ds/ext-ds && cd ext-ds && phpize && ./configure && make install \
  8. && cd /tmp && git clone https://github.com/msgpack/msgpack-php && cd msgpack-php && phpize && ./configure && make install \
  9. && cd /tmp && git clone https://github.com/lz4/lz4 && cd lz4 && make install \
  10. && cd /tmp && git clone https://github.com/phpredis/phpredis && cd phpredis && phpize && ./configure --enable-redis-msgpack --enable-redis-lz4 --with-liblz4=yes && make install \
  11. && cd /tmp && git clone https://github.com/libvips/php-vips-ext && cd php-vips-ext && phpize && ./configure && make install \
  12. && rm -rf /usr/share/php7 \
  13. && rm -rf /tmp/* \
  14. && apk del .phpize-deps gcc g++ git autoconf > /dev/null
  15. RUN docker-php-ext-install bcmath exif gd gettext gmp intl mysqli opcache pdo pdo_mysql mysqli pdo_pgsql pgsql \
  16. && docker-php-ext-enable ds msgpack redis apcu vips
  17. WORKDIR /var/www/social