mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 08:33:06 +00:00
Merge pull request #448 from prometheus/rework-dockerfile
Rework dockerfile
This commit is contained in:
commit
ebcd32c04e
31
Dockerfile
31
Dockerfile
@ -1,12 +1,27 @@
|
||||
FROM ubuntu:13.10
|
||||
FROM golang:1.4
|
||||
MAINTAINER Prometheus Team <prometheus-developers@googlegroups.com>
|
||||
RUN apt-get -qy update && apt-get -qy install vim-common gcc mercurial && \
|
||||
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
|
||||
|
||||
EXPOSE 9090
|
||||
VOLUME [ "/prometheus" ]
|
||||
WORKDIR /prometheus
|
||||
|
||||
ENTRYPOINT [ "/prometheus-src/prometheus" ]
|
||||
CMD [ "-config.file=/prometheus.conf" ]
|
||||
RUN apt-get update && apt-get install -yq make git curl sudo mercurial vim-common gcc
|
||||
ADD . /prometheus-src
|
||||
RUN cd /prometheus-src && make tools binary
|
||||
ADD ./documentation/examples/prometheus.conf /prometheus.conf
|
||||
ENTRYPOINT [ "/go/src/github.com/prometheus/prometheus/prometheus" ]
|
||||
CMD [ "-logtostderr", "-config.file=/prometheus.conf" ]
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
VERSION=0.9.0rc3
|
||||
VERSION=$(shell cat `git rev-parse --show-toplevel`/VERSION)
|
||||
|
||||
OS=$(shell uname)
|
||||
ARCH=$(shell uname -m)
|
||||
|
Loading…
Reference in New Issue
Block a user