Skip to content

Commit 7e4d64c

Browse files
committed
Added New Relinc integration to Dockerfile in mainline/precise
1 parent e5ea8a3 commit 7e4d64c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# About this Repo
22

3-
This is the Git repo of the official Docker image for [nginx](https://registry.hub.docker.com/_/nginx/). See the
3+
This is the Git fork of the official Docker image for [nginx](https://registry.hub.docker.com/_/nginx/). See the
44
Hub page for the full readme on how to use the Docker image and for information
55
regarding contributing and issues.
66

77
The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs),
88
specificially in [docker-library/docs/nginx](https://github.com/docker-library/docs/tree/master/nginx).
99

10+
This repo add to mainline/precise the integration with [New Relic](http://newrelic.com/) to measure and monitor the container. It is required that you edit the Dockerfile adding your license key where indicated.

mainline/precise/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ ENV NGINX_VERSION 1.9.11-1~precise
66

77
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
88
&& echo "deb http://nginx.org/packages/mainline/ubuntu/ precise nginx" >> /etc/apt/sources.list \
9+
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \
10+
&& wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add - \
911
&& apt-get update \
10-
&& apt-get install -y ca-certificates nginx=${NGINX_VERSION} gettext-base \
12+
&& apt-get install -y ca-certificates nginx=${NGINX_VERSION} gettext-base newrelic-sysmond \
1113
&& rm -rf /var/lib/apt/lists/*
1214

1315
# forward request and error logs to docker log collector
1416
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
1517
&& ln -sf /dev/stderr /var/log/nginx/error.log
1618

19+
#New Relic Configuration
20+
RUN nrsysmond-config --set license_key=YOUR_LICENSE_KEY \
21+
&& /etc/init.d/newrelic-sysmond start
22+
1723
EXPOSE 80 443
1824

1925
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)