Created
July 12, 2017 11:44
-
-
Save fizzka/b7a9007ba9fce2adf7b818bf82104665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:5 AS build-amqp | |
ENV RABBITMQ_C_VERSION=0.8.0 | |
RUN apt-get update && apt-get install -y cmake unzip libssl-dev | |
RUN curl -sL https://github.com/alanxz/rabbitmq-c/archive/v${RABBITMQ_C_VERSION}.zip \ | |
-o rabbitmq-c-${RABBITMQ_C_VERSION}.zip | |
RUN unzip rabbitmq-c-${RABBITMQ_C_VERSION}.zip | |
RUN \ | |
cd rabbitmq-c-${RABBITMQ_C_VERSION} && \ | |
mkdir build && cd build && \ | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ | |
cmake --build . --target install && \ | |
cd ../../ && rm -rf rabbitmq-c* | |
RUN pecl install amqp && docker-php-ext-enable amqp | |
FROM php:5-apache AS build-master | |
RUN pecl install xdebug | |
RUN docker-php-ext-enable xdebug | |
RUN apt-get -y update && apt-get install -y libxml2-dev libmcrypt-dev libicu-dev git unzip | |
RUN docker-php-ext-install -j$(nproc) soap mcrypt intl | |
COPY --from=build-amqp /usr/local/lib/php/extensions/no-debug-non-zts-20131226/amqp.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/amqp.so | |
COPY --from=build-amqp /usr/local/lib/x86_64-linux-gnu/librabbitmq.so* /usr/local/lib/x86_64-linux-gnu/ | |
RUN docker-php-ext-enable amqp | |
WORKDIR /var/www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment