Skip to content

Commit

Permalink
Merge pull request #122 from mikeklein13/kafka-ext
Browse files Browse the repository at this point in the history
PHP Extensions: add rdkafka
  • Loading branch information
bryanlatten authored Jan 31, 2017
2 parents 0b4d811 + 5169996 commit 9df1835
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-edge
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-legacy
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Three variants are available:
- pgsql~
- phar
- posix
- rdkafka~
- redis~^
- shmop
- SimpleXML
Expand Down
3 changes: 3 additions & 0 deletions container/root/tests/php-fpm/alpine.goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions container/root/tests/php-fpm/base.goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ['!/./']
3 changes: 3 additions & 0 deletions container/root/tests/php-fpm/ubuntu.goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9df1835

Please sign in to comment.