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
3 changed files with 16 additions and 7 deletions

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 \