2015-01-12 14:15:26 +00:00
|
|
|
FROM golang:1.4
|
2015-01-21 19:07:45 +00:00
|
|
|
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
|
2015-04-14 07:36:34 +00:00
|
|
|
RUN apt-get -qy update && apt-get -qy install vim-common gcc mercurial && rm -rf /var/lib/apt/lists/* && \
|
2015-01-12 14:15:26 +00:00
|
|
|
go get github.com/tools/godep
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/prometheus/prometheus
|
|
|
|
ADD . /go/src/github.com/prometheus/prometheus
|
|
|
|
|
|
|
|
RUN godep restore && go get -d
|
|
|
|
RUN ./utility/embed-static.sh web/static web/templates | gofmt > web/blob/files.go
|
|
|
|
|
|
|
|
RUN go build -ldflags " \
|
|
|
|
-X main.buildVersion $(cat VERSION) \
|
|
|
|
-X main.buildRevision $(git rev-parse --short HEAD) \
|
|
|
|
-X main.buildBranch $(git rev-parse --abbrev-ref HEAD) \
|
|
|
|
-X main.buildUser root \
|
|
|
|
-X main.buildDate $(date +%Y%m%d-%H:%M:%S) \
|
|
|
|
-X main.goVersion $GOLANG_VERSION \
|
|
|
|
"
|
|
|
|
RUN cd tools/rule_checker && go build
|
|
|
|
ADD ./documentation/examples/prometheus.conf /prometheus.conf
|
|
|
|
|
2014-02-06 16:29:37 +00:00
|
|
|
EXPOSE 9090
|
|
|
|
VOLUME [ "/prometheus" ]
|
|
|
|
WORKDIR /prometheus
|
2015-01-12 14:15:26 +00:00
|
|
|
ENTRYPOINT [ "/go/src/github.com/prometheus/prometheus/prometheus" ]
|
2015-01-28 18:52:32 +00:00
|
|
|
CMD [ "-logtostderr", "-config.file=/prometheus.conf", \
|
2015-03-03 23:34:35 +00:00
|
|
|
"-storage.local.path=/prometheus", \
|
2015-01-28 18:52:32 +00:00
|
|
|
"-web.console.libraries=/go/src/github.com/prometheus/prometheus/console_libraries", \
|
|
|
|
"-web.console.templates=/go/src/github.com/prometheus/prometheus/consoles" ]
|