Skip to content

Instantly share code, notes, and snippets.

@insekticid
Last active November 22, 2021 07:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insekticid/95b66b29f0ca6a55055b0be20337f41a to your computer and use it in GitHub Desktop.
Save insekticid/95b66b29f0ca6a55055b0be20337f41a to your computer and use it in GitHub Desktop.
PHP 7.2 Meminfo extension in Alpine Linux image @BitOne/php-meminfo
FROM phpearth/php:7.2-nginx
ENV PHP_INI_DIR /etc/php/7.2
RUN mkdir -p $PHP_INI_DIR/conf.d
RUN apk add --no-cache make composer php7.2-xdebug git
RUN apk add --no-cache php7.2-dev gcc g++
RUN curl -L -o /tmp/meminfo.tar.gz https://github.com/BitOne/php-meminfo/archive/master.tar.gz \
&& tar zxpf /tmp/meminfo.tar.gz -C /tmp \
&& rm -r /tmp/meminfo.tar.gz \
&& cd /tmp/php-meminfo-master/extension/php7/ && phpize && ./configure --enable-meminfo && make && make install \
&& rm -rf /tmp/* \
&& printf "extension=meminfo.so\n" > $PHP_INI_DIR/conf.d/meminfo.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment