Skip to content

Commit

Permalink
Merge pull request laradock#2960 from laradock/fix-ci
Browse files Browse the repository at this point in the history
feat(CI build failed):  php-fpm AMQP
  • Loading branch information
bestlong authored Apr 26, 2021
2 parents 91575b1 + f49b0cb commit 618a9d1
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -410,32 +410,18 @@ RUN set -eux; \

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 -yqq install cmake && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ] || [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
curl -L -o /tmp/rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/v0.11.0.tar.gz; \
else \
curl -L -o /tmp/rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/master.tar.gz; \
fi && \
mkdir -p rabbitmq-c && \
tar -C rabbitmq-c -zxvf /tmp/rabbitmq-c.tar.gz --strip 1 && \
cd rabbitmq-c/ && \
mkdir _build && cd _build/ && \
cmake .. && \
cmake --build . --target install && \
# Install the amqp extension
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 && \
php -m | grep -q 'sockets' \
;fi
RUN set -eux; \
if [ ${INSTALL_AMQP} = true ]; then \
# # Install the amqp extension
apt-get -yqq install librabbitmq-dev; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install amqp-1.11.0beta; \
else \
pecl install amqp; \
fi; \
docker-php-ext-enable amqp; \
php -m | grep -oiE '^amqp$'; \
fi

###########################################################################
# CASSANDRA:
Expand Down

0 comments on commit 618a9d1

Please sign in to comment.