Last active
November 2, 2021 06:14
-
-
Save satishgadhave/8e33c92fd09992692e19f690302cb416 to your computer and use it in GitHub Desktop.
NewRelic PHP APM Agent Dockerfile instructions
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:7.4.5-fpm | |
ARG NEW_RELIC_AGENT_VERSION | |
ARG NEW_RELIC_LICENSE_KEY | |
ARG NEW_RELIC_APPNAME | |
ARG NEW_RELIC_DAEMON_ADDRESS | |
# Download and install NewRelic PHP extension. This generates newrelic.ini file at /usr/local/etc/php/conf.d/newrelic.ini | |
RUN curl -L "https://download.newrelic.com/php_agent/archive/${NEW_RELIC_AGENT_VERSION}/newrelic-php5-${NEW_RELIC_AGENT_VERSION}-linux.tar.gz" | tar -C /tmp -zx \ | |
&& export NR_INSTALL_USE_CP_NOT_LN=1 \ | |
&& export NR_INSTALL_SILENT=1 \ | |
&& /tmp/newrelic-php5-*/newrelic-install install \ | |
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* | |
# Set parameter values in newrelic.ini file e.g. license key | |
RUN sed -i -e s/\"REPLACE_WITH_REAL_KEY\"/${NEW_RELIC_LICENSE_KEY}/ \ | |
-e s/newrelic.appname[[:space:]]=[[:space:]].\*/newrelic.appname="${NEW_RELIC_APPNAME}"/ \ | |
-e s/\;newrelic.daemon.address[[:space:]]=[[:space:]].\*/newrelic.daemon.address="${NEW_RELIC_DAEMON_ADDRESS}"/ \ | |
/usr/local/etc/php/conf.d/newrelic.ini | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, after executing the curl command it gives me this error.
Could you please help me to solve the issue?