Merge pull request #2894 from PavelSavushkinMix/feature/php8.0_amqp

AMQP installation for all images and all php versions
This commit is contained in:
Shao Yu-Lung (Allen) 2021-03-21 22:00:41 +08:00 committed by GitHub
commit 53570ee982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View File

@ -1,6 +1,6 @@
name: CI
on:
on:
push:
branches: '**'
tags: '**'
@ -34,7 +34,6 @@ jobs:
sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env
sed -i -- 's/YAML=true/YAML=false/g' .env
sed -i -- 's/MSSQL=true/MSSQL=false/g' .env
sed -i -- 's/AMQP=true/AMQP=false/g' .env
sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env
sed -i -- 's/OCI8=true/OCI8=false/g' .env
sed -i -- 's/IONCUBE=true/IONCUBE=false/g' .env

View File

@ -381,7 +381,7 @@ ARG INSTALL_AMQP=false
RUN if [ ${INSTALL_AMQP} = true ]; then \
# download and install manually, to make sure it's compatible with ampq installed by pecl later
# install cmake first
apt-get -y install cmake && \
apt-get -yqq install cmake && \
curl -L -o /tmp/rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/master.tar.gz && \
mkdir -p rabbitmq-c && \
tar -C rabbitmq-c -zxvf /tmp/rabbitmq-c.tar.gz --strip 1 && \
@ -390,7 +390,11 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
cmake .. && \
cmake --build . --target install && \
# Install the amqp extension
pecl install amqp && \
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 && \
# Install the sockets extension
docker-php-ext-install sockets \

View File

@ -226,14 +226,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