Closed mvanduijker closed 2 weeks ago
possible workaround for the bugged install script:
mkdir /etc/conf.d && mkdir /etc/init.d
Alpine 3.20 removed these empty directories, and the install script expects these directories to be present.
I'm not sure where the newrelic-install
script source is located, but reading it i found another bug:
In the doc it says NR_INSTALL_INITSCRIPT
, but later on NR_INSTALL_INITFILE
is used. You could set this to a temp folder, so you dont need to create the /etc/init.d/
folder.
But no such mechanism exists for the /etc/conf.d
problem, because the path is hardcoded:
elif [ "${ostype}" = "alpine" ]; then
sysconf=/etc/conf.d/newrelic-daemon
fi
Work has been completed on this issue.
Work has been completed on this issue.
Below is the commands that works for me in php:8.1-fpm-alpine
RUN mkdir -p /etc/conf.d && mkdir -p /etc/init.d
#Install Newrelic Agent
ENV NEW_RELIC_AGENT_VERSION=10.12.0.1
RUN curl -L https://download.newrelic.com/php_agent/archive/${NEW_RELIC_AGENT_VERSION}/newrelic-php5-${NEW_RELIC_AGENT_VERSION}-linux-musl.tar.gz | tar -C /tmp -zx \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& export NR_INSTALL_INITFILE=/tmp/newrelic-daemon \
&& /tmp/newrelic-php5-*/newrelic-install install \
&& rm -rf /tmp/newrelic-php5-* /tmp/nrinstall*
Install script fails on alpine 3.20 for official docker image tags
Description
Yesterday official docker images are released with alpine 3.20. The "naked" (like php:8.3-fpm-alpine) alpine tags are upgraded to this version but the install script fails with this error:
Steps to Reproduce
build this dockerfile
Expected Behavior
Relevant Logs / Console output
Your Environment
Additional context
Building the docker container with alpine 3.19 works. So if you have this issue, set docker tag to something like
php:8.3-fpm-alpine3.19