forked from newrelic/newrelic-php-daemon-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-template
37 lines (26 loc) · 1.14 KB
/
Dockerfile-template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#------------------------------------------------------------------------------
# Copyright [2019] New Relic Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#------------------------------------------------------------------------------
FROM alpine:3.13 AS build
ENV NEWRELIC_VERSION
ENV NEWRELIC_NAME newrelic-php5-${NEWRELIC_VERSION}-linux-musl
ENV NEWRELIC_SHA
RUN set -ex; \
wget -O /tmp/${NEWRELIC_NAME}.tar.gz https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/${NEWRELIC_NAME}.tar.gz; \
cd /tmp/; \
echo "$NEWRELIC_SHA $NEWRELIC_NAME.tar.gz" | sha256sum -c; \
tar -xzf ${NEWRELIC_NAME}.tar.gz; \
export NR_INSTALL_SILENT=1; \
${NEWRELIC_NAME}/newrelic-install install_daemon
FROM alpine:3.13
# The daemon needs certs installed to run
RUN apk add --no-cache \
ca-certificates
RUN set -ex; \
mkdir /var/log/newrelic
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
COPY --from=build /usr/bin/newrelic-daemon /usr/bin/newrelic-daemon
EXPOSE 31339
ENTRYPOINT ["sh","/usr/bin/docker-entrypoint.sh"]
CMD ["/usr/bin/newrelic-daemon"]