-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
21 lines (19 loc) · 830 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM php:8.2-bookworm
LABEL maintainer="Andrea Falco <andrea@falco.sh>"
# PHP ext-newrelic
ARG PHPEXT_NEWRELIC_VERSION=10.21.0.11
RUN set -eux; \
curl -fsSL https://download.newrelic.com/php_agent/archive/${PHPEXT_NEWRELIC_VERSION}/newrelic-php5-${PHPEXT_NEWRELIC_VERSION}-linux.tar.gz \
| tar -xzC /tmp; \
export NR_INSTALL_USE_CP_NOT_LN=1; \
/tmp/newrelic-php5-*/newrelic-install install; \
\
sed -i \
-e 's/"REPLACE_WITH_REAL_KEY"/"YOUR_LICENSE_KEY"/' \
-e 's/newrelic.appname = "PHP Application"/newrelic.appname = "YOUR_APPLICATION_NAME"/' \
-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 \
; \
\
rm -rf /tmp/* /var/tmp/*