Skip to content

Commit

Permalink
Merge pull request #155 from bryanlatten/feature-newrelic-72
Browse files Browse the repository at this point in the history
Dockerfile: NewRelic supports PHP 7.2
  • Loading branch information
bryanlatten authored Jan 22, 2018
2 parents e752118 + 2c6a71c commit 4f58ef3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-56
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ RUN apt-get update -q && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
# Install new PHP5-stable version of Redis \
pecl install redis-3.1.4 && \
pecl install redis-3.1.6 && \
echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \
# Remove dev packages that were only in place just to compile extensions
apt-get remove --purge -yq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-70
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ RUN apt-get update -q && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
# Install new PHP7-stable version of Redis \
pecl install redis-3.1.4 && \
pecl install redis-3.1.6 && \
echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \
# Remove dev packages that were only in place just to compile extensions
apt-get remove --purge -yq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-71
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ RUN apt-get update -q && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
# Install new PHP 7.1-stable version of Redis
pecl install redis-3.1.4 && \
pecl install redis-3.1.6 && \
echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \
# Remove dev packages that were only in place just to compile extensions
apt-get remove --purge -yq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-71-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ RUN apk update && \
echo "extension=igbinary.so" > $CONF_PHPMODS/igbinary.ini && \
pecl install yaml-2.0.2 && \
echo ";extension=yaml.so" > $CONF_PHPMODS/yaml.ini && \
pecl install redis-3.1.4 && \
pecl install redis-3.1.6 && \
echo ";extension=redis.so" > $CONF_PHPMODS/redis.ini && \
pecl install msgpack-2.0.2 && \
echo "extension=msgpack.so" > $CONF_PHPMODS/msgpack.ini && \
Expand Down
13 changes: 5 additions & 8 deletions Dockerfile-72
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ RUN /bin/bash -e /security_updates.sh && \
# TODO: fix these packages:
# php7.2-mcrypt
# php-xdebug
# newrelic-php5
# newrelic-php5-common
# newrelic-daemon

# Add PHP and support packages \
RUN apt-get update -q && \
Expand Down Expand Up @@ -92,6 +89,9 @@ RUN apt-get update -q && \
php7.2-xml \
php7.2-yaml \
php7.2-zip \
newrelic-php5 \
newrelic-php5-common \
newrelic-daemon \
&& \
phpdismod pdo_pgsql && \
phpdismod pgsql && \
Expand All @@ -105,7 +105,7 @@ RUN apt-get update -q && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
# Install new PHP 7.X-stable version of Redis
pecl install redis-3.1.4 && \
pecl install redis-3.1.6 && \
echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \
# Remove dev packages that were only in place just to compile extensions
apt-get remove --purge -yq \
Expand All @@ -124,10 +124,7 @@ RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
# Override default ini values for both CLI + FPM \
phpenmod overrides && \
# Enable NewRelic via Ubuntu symlinks, but disable in file. Cross-variant startup script uncomments with env vars.
# HACK: ensure file/folders exist so prep script still runs until NewRelic extension works with PHP 7.2
touch $CONF_PHPMODS/newrelic.ini && \
mkdir /var/log/newrelic && \
# phpenmod newrelic && \
phpenmod newrelic && \
# - Run standard set of tweaks to ensure runs performant, reliably, and consistent between variants
/bin/bash -e /prep-php.sh

Expand Down
20 changes: 10 additions & 10 deletions container/root/tests/php-fpm/7.2.goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,16 @@ file:
- '/^request_terminate_timeout = \${PHP_FPM_MAX_EXECUTION_TIME}/'
- '/^rlimit_files = 40000/'
- '/^rlimit_core = unlimited/'
# /etc/php/7.2/mods-available/newrelic.ini:
# exists: true
# contains:
# - '/^;extension =/'
# - '/^newrelic.appname = \"\${REPLACE_NEWRELIC_APP}\"/'
# - '/^newrelic.license = \"\${REPLACE_NEWRELIC_LICENSE}\"/'
# - '/^newrelic.logfile = \"\/dev\/stdout\"/'
# - '/^newrelic.daemon.logfile = \"\/dev\/stdout\"/'
# - '/^newrelic.loglevel = \"warning\"/'
# - '/^newrelic.daemon.loglevel = \"warning\"/'
/etc/php/7.2/mods-available/newrelic.ini:
exists: true
contains:
- '/^;extension =/'
- '/^newrelic.appname = \"\${REPLACE_NEWRELIC_APP}\"/'
- '/^newrelic.license = \"\${REPLACE_NEWRELIC_LICENSE}\"/'
- '/^newrelic.logfile = \"\/dev\/stdout\"/'
- '/^newrelic.daemon.logfile = \"\/dev\/stdout\"/'
- '/^newrelic.loglevel = \"warning\"/'
- '/^newrelic.daemon.loglevel = \"warning\"/'
/etc/php/7.2/fpm/php-fpm.conf:
exists: true
contains:
Expand Down

0 comments on commit 4f58ef3

Please sign in to comment.