richarvey / nginx-php-fpm

Nginx and php-fpm for dockerhub builds
https://hub.docker.com/repository/docker/richarvey/nginx-php-fpm/general
GNU General Public License v3.0
1.66k stars 852 forks source link

how to install rabbitmq by php:7.2.4-fpm-alpine #251

Closed G-Bruin closed 5 years ago

G-Bruin commented 5 years ago

I solved it

ENV PHP_AMQP_VERSION v1.9.3

RUN apk add --update --no-cache rabbitmq-c

RUN apk add --update --no-cache --virtual .build-deps git autoconf make g++  zlib-dev  rabbitmq-c-dev pcre-dev && \
#RUN apk add --update --no-cache --virtual .build-deps rabbitmq-c git autoconf make g++ zlib-dev rabbitmq-c-dev pcre-dev && \
    mkdir -p /usr/src/rabbitmq-c && \
    git clone --branch ${PHP_AMQP_VERSION} https://github.com/pdezwart/php-amqp.git /tmp/php-amqp && \
    cd /tmp/php-amqp && \
    phpize && ./configure && make && make install && \
    cd .. && rm -rf /tmp/php-amqp/ && \
    apk del .build-deps

# tweak php-fpm config 
echo "extension=amqp.so" >> ${php_vars} &&\
G-Bruin commented 5 years ago

image