diff --git a/README.md b/README.md index f0d253c2..f27b5c2b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # About this Repo -This is the Git repo of the official Docker image for [nginx](https://registry.hub.docker.com/_/nginx/). See the +This is the Git fork of the official Docker image for [nginx](https://registry.hub.docker.com/_/nginx/). See the Hub page for the full readme on how to use the Docker image and for information regarding contributing and issues. The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specificially in [docker-library/docs/nginx](https://github.com/docker-library/docs/tree/master/nginx). +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. diff --git a/mainline/precise/Dockerfile b/mainline/precise/Dockerfile index 2c6f8ffa..c4a5a1ee 100644 --- a/mainline/precise/Dockerfile +++ b/mainline/precise/Dockerfile @@ -6,14 +6,20 @@ ENV NGINX_VERSION 1.9.11-1~precise RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \ && echo "deb http://nginx.org/packages/mainline/ubuntu/ precise nginx" >> /etc/apt/sources.list \ + && echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \ + && wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add - \ && apt-get update \ - && apt-get install -y ca-certificates nginx=${NGINX_VERSION} gettext-base \ + && apt-get install -y ca-certificates nginx=${NGINX_VERSION} gettext-base newrelic-sysmond \ && rm -rf /var/lib/apt/lists/* # forward request and error logs to docker log collector RUN ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log +#New Relic Configuration +RUN nrsysmond-config --set license_key=YOUR_LICENSE_KEY \ + && /etc/init.d/newrelic-sysmond start + EXPOSE 80 443 CMD ["nginx", "-g", "daemon off;"]