diff --git a/Dockerfile b/Dockerfile index aefcc32..9ff19f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,6 +86,7 @@ RUN apt-get update -q && \ newrelic-php5-common=${NEWRELIC_VERSION} \ newrelic-daemon=${NEWRELIC_VERSION} \ libyaml-dev \ + librdkafka-dev \ && \ phpdismod pdo_pgsql && \ phpdismod pgsql && \ @@ -98,6 +99,9 @@ RUN apt-get update -q && \ # Install new PHP7-stable version of Redis \ pecl install redis-3.1.0 && \ echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \ + # Install kafka extension + pecl install rdkafka-3.0.1 && \ + echo "extension=rdkafka.so" > $CONF_PHPMODS/rdkafka.ini && \ # Remove dev packages that were only in place just to compile extensions apt-get remove --purge -yq \ php7.0-dev \ diff --git a/Dockerfile-alpine b/Dockerfile-alpine index 31de319..1f41cbf 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -74,6 +74,7 @@ RUN apk update && \ php7-xsl \ php7-zip \ php7-zlib \ + librdkafka-dev@edge \ && \ # Alpine + Ubuntu use different versioned names --> now standardized \ ln -s /usr/bin/php7 /usr/bin/php && \ @@ -126,6 +127,9 @@ RUN apk update && \ # Install new PHP7-stable version of Redis \ pecl install redis-3.1.0 && \ echo ";extension=redis.so" > $CONF_PHPMODS/redis.ini && \ + # Install kafka extension + pecl install rdkafka && \ + echo ";extension=rdkafka.so" > $CONF_PHPMODS/rdkafka.ini && \ rm -rf /usr/share/php7 && \ apk del .phpize_deps && \ /bin/bash -e /clean.sh diff --git a/Dockerfile-edge b/Dockerfile-edge index f68d8da..f2f2e4c 100644 --- a/Dockerfile-edge +++ b/Dockerfile-edge @@ -86,6 +86,7 @@ RUN apt-get update -q && \ newrelic-php5-common=${NEWRELIC_VERSION} \ newrelic-daemon=${NEWRELIC_VERSION} \ libyaml-dev \ + librdkafka-dev \ && \ phpdismod pdo_pgsql && \ phpdismod pgsql && \ @@ -97,6 +98,9 @@ RUN apt-get update -q && \ # Install new PHP7-stable version of Redis <--- currently broken due to PHP 7.1.0-1 compatibility with version check # pecl install redis-3.1.0 && \ # echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \ + # Install kafka extension + pecl install rdkafka-3.0.1 && \ + echo "extension=rdkafka.so" > $CONF_PHPMODS/rdkafka.ini && \ # Remove dev packages that were only in place just to compile extensions apt-get remove --purge -yq \ php7.1-dev \ diff --git a/Dockerfile-legacy b/Dockerfile-legacy index 0cf5d8c..2065c47 100644 --- a/Dockerfile-legacy +++ b/Dockerfile-legacy @@ -86,6 +86,7 @@ RUN apt-get update -q && \ newrelic-php5-common=${NEWRELIC_VERSION} \ newrelic-daemon=${NEWRELIC_VERSION} \ libyaml-dev \ + librdkafka-dev \ && \ phpdismod pdo_pgsql && \ phpdismod pgsql && \ @@ -98,6 +99,9 @@ RUN apt-get update -q && \ # Install new PHP5-stable version of Redis \ pecl install redis-3.1.0 && \ echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \ + # Install kafka extension + pecl install rdkafka-3.0.1 && \ + echo "extension=rdkafka.so" > $CONF_PHPMODS/rdkafka.ini && \ # Remove dev packages that were only in place just to compile extensions apt-get remove --purge -yq \ php5.6-dev \ diff --git a/README.md b/README.md index 05b59e0..4fd09ee 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ Three variants are available: - pgsql~ - phar - posix + - rdkafka~ - redis~^ - shmop - SimpleXML diff --git a/container/root/tests/php-fpm/alpine.goss.yaml b/container/root/tests/php-fpm/alpine.goss.yaml index c6216c9..b4abee9 100644 --- a/container/root/tests/php-fpm/alpine.goss.yaml +++ b/container/root/tests/php-fpm/alpine.goss.yaml @@ -22,6 +22,9 @@ command: php -n -d extension=session.so -d extension=redis.so -m | grep redis: exit-status: 0 stderr: ['!/./'] + php -n -d extension=rdkafka.so -m | grep rdkafka: + exit-status: 0 + stderr: ['!/./'] package: php7: diff --git a/container/root/tests/php-fpm/base.goss.yaml b/container/root/tests/php-fpm/base.goss.yaml index 6e990b8..a618d76 100644 --- a/container/root/tests/php-fpm/base.goss.yaml +++ b/container/root/tests/php-fpm/base.goss.yaml @@ -39,3 +39,6 @@ command: php -n -d extension=pdo.so -d extension=pdo_pgsql.so -m | grep pdo_pgsql: exit-status: 0 stderr: ['!/./'] + php -n -d extension=rdkafka.so -m | grep rdkafka: + exit-status: 0 + stderr: ['!/./'] diff --git a/container/root/tests/php-fpm/ubuntu.goss.yaml b/container/root/tests/php-fpm/ubuntu.goss.yaml index 9278f4b..9ab7f06 100644 --- a/container/root/tests/php-fpm/ubuntu.goss.yaml +++ b/container/root/tests/php-fpm/ubuntu.goss.yaml @@ -21,6 +21,9 @@ command: php -n -d extension=redis.so -m | grep redis: exit-status: 0 stderr: ['!/./'] + php -n -d extension=rdkafka.so -m | grep rdkafka: + exit-status: 0 + stderr: ['!/./'] package: php7.0: