diff --git a/.build/package/run_prometheus.sh b/.build/package/run_prometheus.sh index f79e8319d9..12fbee2f4c 100755 --- a/.build/package/run_prometheus.sh +++ b/.build/package/run_prometheus.sh @@ -26,4 +26,4 @@ if [[ "${platform}" == "darwin" ]]; then export DYLD_LIBRARY_PATH="${binary_directory}/lib:${DYLD_LIBRARY_PATH}" fi -"${binary_directory}/prometheus" "${@}" & +exec "${binary_directory}/prometheus" "${@}" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..b64b574fc4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# Cannot use busybox image since Prometheus depends on libc. +FROM base + +MAINTAINER Prometheus Team +EXPOSE 9090 +ENTRYPOINT ["/opt/prometheus/run_prometheus.sh"] +ADD .build/package/ /opt/prometheus diff --git a/Makefile b/Makefile index efab123152..fbb51d6342 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ build: config dependencies model preparation tools web cp prometheus $(BUILD_PATH)/package/prometheus rsync -av --delete $(BUILD_PATH)/root/lib/ $(BUILD_PATH)/package/lib/ +docker: build + docker build -t prometheus:$(REV) . + $(BUILD_PATH)/cache/$(GOPKG): curl -o $@ http://go.googlecode.com/files/$(GOPKG)