[PHP] Kubernetes integration PHP agent

Hi Explore Hub,
I am running kubernetes enviroment EKS with one php application. Now I want to install php agent in my application container in our Dockerfile. I have used these steps to install this:

RUN curl -L https://download.newrelic.com/php_agent/release/newrelic-php5- | 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* && sed -i -e ‘s/“REPLACE_WITH_REAL_KEY”/""/’ -e ‘s/newrelic.appname = “PHP Application”/newrelic.appname = “Stag-EKS”/’ -e ‘s/;newrelic.daemon.app_connect_timeout =./newrelic.daemon.app_connect_timeout=15s/’ -e 's/;newrelic.daemon.start_timeout =./newrelic.daemon.start_timeout=5s/’ /usr/local/etc/php/conf.d/newrelic.ini

When I run docker build command: I got an error “sed: can’t read /usr/local/etc/php/conf.d/newrelic.ini: No such file or directory”.

In My Dockerfile, I have used base image as a ubuntu 20:LTS with php7.4 models extension installed with PHP FPM with Nginx.

Can you please tell me what is the solution for that?

Hey there @harender,

I hope you are having a good day.

We read every post we want you to know we take all support questions seriously. Our goal is to always have everyone in the community feel supported.

This support topic is a little outside of my scope, however we see you, and we are working towards finding a solution. I am going to loop in a PHP professional from our team to help out with this as they are much better equipped to answer your question. In the mean time you may consider looking over this doc here: Docker and other container environments: Install PHP agent | New Relic Documentation. This do has useful information regarding installation for PHP in a container environments and also has some troubleshooting articles at the bottom.

We appreciate your patience while we help you work through this. Please let us know if you found an answer to your question in this article and if not we will continue to provide support!

Hey there @harender ,

Thanks for reaching out to the New Relic Community! I think I might be able to shed some light on your situation through these docs here:

I hope this info helps!