-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fake version bump to test trivy scan
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright [2019] New Relic Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
#------------------------------------------------------------------------------ | ||
|
||
|
||
FROM alpine:3.13 AS build | ||
|
||
ENV NEWRELIC_VERSION 11.3.0.16 | ||
ENV NEWRELIC_NAME newrelic-php5-${NEWRELIC_VERSION}-linux-musl | ||
ENV NEWRELIC_SHA bebd7cb1137296c78b04816654c02fe330efc937947a00c6d7239f197835c5d1 | ||
|
||
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 | ||
|
||
COPY --from=build /usr/bin/newrelic-daemon /bin/newrelic-daemon | ||
|
||
EXPOSE 31339 | ||
|
||
ENTRYPOINT [ "/bin/newrelic-daemon" ] | ||
CMD ["--foreground", "--logfile", "/proc/self/fd/1", "--port", "31339"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |