diff options
author | Johannes 'fish' Ziemke <github@freigeist.org> | 2014-12-18 13:12:02 +0100 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2014-12-18 13:18:03 +0100 |
commit | 13e9b5ee8b59722e9fc404b184247fa75caa9047 (patch) | |
tree | 1557cf9ffc8415a160b6482f95d22e26f0ea2f1b /Dockerfile | |
parent | 318203921f1a29aa4824dd1c8dcfddba77a390cc (diff) | |
download | prometheus_node_collector-13e9b5ee8b59722e9fc404b184247fa75caa9047.tar.bz2 prometheus_node_collector-13e9b5ee8b59722e9fc404b184247fa75caa9047.tar.xz prometheus_node_collector-13e9b5ee8b59722e9fc404b184247fa75caa9047.zip |
Simplify Dockerfile by using golang:onbuild image
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -1,16 +1,6 @@ | |||
1 | FROM ubuntu:13.10 | 1 | FROM golang:onbuild |
2 | MAINTAINER Prometheus Team <prometheus-developers@googlegroups.com> | 2 | MAINTAINER Prometheus Team <prometheus-developers@googlegroups.com> |
3 | 3 | ||
4 | RUN apt-get update && apt-get install -yq curl git mercurial gcc | 4 | ENTRYPOINT [ "go-wrapper", "run" ] |
5 | RUN curl -s https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz | tar -C /usr/local -xzf - | 5 | CMD [ "-logtostderr" ] |
6 | ENV PATH /usr/local/go/bin:$PATH | ||
7 | ENV GOPATH /go | ||
8 | |||
9 | ADD . /usr/src/node_exporter | ||
10 | RUN cd /usr/src/node_exporter && \ | ||
11 | go get -d && go build && cp node_exporter / | ||
12 | RUN printf '{ "scrapeInterval": 10, "attributes": {} }' > \ | ||
13 | node_exporter.conf | ||
14 | |||
15 | ENTRYPOINT [ "/node_exporter" ] | ||
16 | EXPOSE 8080 | 6 | EXPOSE 8080 |