Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version bump to 9.15.0 #34

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions 9.15.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#------------------------------------------------------------------------------
# Copyright [2019] New Relic Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#------------------------------------------------------------------------------


FROM alpine:3.10 AS build

ENV NEWRELIC_VERSION 9.15.0.293
ENV NEWRELIC_NAME newrelic-php5-${NEWRELIC_VERSION}-linux-musl
ENV NEWRELIC_SHA bb224528602d37e6331ce5f4588343b0bbd45adbe1e447a061885120e1ec8f8e

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.10

# 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"]
26 changes: 26 additions & 0 deletions 9.15.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
#------------------------------------------------------------------------------
# Copyright [2019] New Relic Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#------------------------------------------------------------------------------
set -e

defaultArgs=" --logfile /proc/self/fd/1 --watchdog-foreground --address=$(hostname):31339"

case "$1" in
-*)
#args start with a flag
set -- /usr/bin/newrelic-daemon $defaultArgs "$@"
;;
'/usr/bin/newrelic-daemon')
# Remove the first element from the arguments
shift 1
set -- /usr/bin/newrelic-daemon $defaultArgs "$@"
;;
*)
#likely invalid args, but the daemon will handle it with graceful messages.
set -- /usr/bin/newrelic-daemon $defaultArgs "$@"
;;
esac

exec "$@"