I have php laravel applicaiton running on EKS, I have 3 nodes and 3 pods on each node.
The application works fine, I recently wanted to install newrelic, I found some instructions and added them to docker file.
ENV NR_INSTALL_SILENT=1
ENV NR_INSTALL_USE_CP_NOT_LN=1
RUN apk add --no-cache bash
# Install New Relic, i can see this ini file with licence key being coppied properly
COPY deployment/newrelic.ini /tmp/newrelic.ini
RUN curl -sSL https://download.newrelic.com/php_agent/archive/10.20.0.10/newrelic-php5-10.20.0.10-linux.tar.gz | tar xzf - -C /tmp
RUN chmod +x /tmp/newrelic-php5-10.20.0.10-linux/newrelic-install &&
ls -al /tmp/newrelic-php5-10.20.0.10-linux/
RUN /bin/bash -c "/tmp/newrelic-php5-10.20.0.10-linux/newrelic-install install"
I have tried to install without bash too, I have tried all possible combinations, but it always downloads and extracts the newrelic but the last command with install does not work.
I can go inside the pod and if i run that command without doing anything, it does installation properly and i can see .so file after that by running
find / -name "newrelic.so" 2>/dev/null
I have echoed and checked, the env variables are there with correct values, and the only thing i am unable to understand that why it works manually and does not throw any error, even if i say
RUN /tmp/newrelic-php5-10.20.0.10-linux/newrelic-install install > /tmp/newrelic_install.log 2>&1
I do not get anything in log file, so i am unable to understand what do i need to do to run this command? what i am doing wrong?