fix(AMQP extension): get it worked for php-worker image

We need to be able to build AMQP for php-worker on PHP 7.0: there are some version conflicts.

Closes #2891
This commit is contained in:
Pavel Savushkin 2021-03-19 23:03:51 +02:00
parent 43df135ca4
commit 2a953c1a9a
No known key found for this signature in database
GPG Key ID: BD2EDA3E125300DD

View File

@ -214,14 +214,20 @@ RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
&& make install \
;fi
# Install AMQP:
ARG INSTALL_AMQP=false
RUN if [ ${INSTALL_AMQP} = true ]; then \
apk --update add rabbitmq-c rabbitmq-c-dev && \
pecl install amqp && \
apk del -q openssl openssl-dev && \
apk --update add -q rabbitmq-c rabbitmq-c-dev && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
printf "\n" | pecl install amqp-1.11.0beta; \
else \
printf "\n" | pecl install amqp; \
fi && \
docker-php-ext-enable amqp && \
apk del -q rabbitmq-c-dev && \
apk add --update -q openssl openssl-dev && \
docker-php-ext-install sockets \
;fi