Summer Sale! All accounts are 50% off this week.

whobutsb's avatar

Installing New Relic on Vapor Dockerfile

Hello All! I'm trying to install New Relic on to my Dockerfile. Here is my Dockerfile:

FROM laravelphp/vapor:php74

# setup newrelic
COPY docker/newrelic.ini /tmp/newrelic.ini
COPY docker/newrelic-php5-9.9.0.260-linux.tar.gz /tmp/newrelic.tar.gz

# # install newrelic
RUN tar -xf /tmp/newrelic.tar.gz -C /tmp && \
    export NR_INSTALL_USE_CP_NOT_LN=1 && \
    export NR_INSTALL_SILENT=1 && \
    /tmp/newrelic-php5-*/newrelic-install install && \
    # rm /etc/php/7.4/fpm/conf.d/newrelic.ini && \
    # rm /etc/php/7.4/cli/conf.d/newrelic.ini && \
    cp /tmp/newrelic.ini /etc/php/7.4/mods-available/newrelic.ini && \
    ln -s /etc/php/7.4/mods-available/newrelic.ini  /etc/php/7.4/fpm/conf.d/20-newrelic.ini && \
    ln -s /etc/php/7.4/mods-available/newrelic.ini  /etc/php/7.4/cli/conf.d/20-newrelic.ini

The issue I run in to is the error: cp: can't create '/etc/php/7.4/mods-available/newrelic.ini': No such file or directory So it looks like the Dockerfile doesn't have the usual /etc/php/7.4/ directory structure. Is there a way to add custom extensions to the php installation? What am I missing here? Thank you for the assistance!

0 likes
1 reply

Please or to participate in this conversation.