From a7b89772202f8cb1be389db449f5c095c1f4647d Mon Sep 17 00:00:00 2001 From: Steve Durrheimer Date: Sun, 7 Jun 2015 13:54:22 +0200 Subject: [PATCH] New Dockerfile using alpine-golang-make-onbuild base image --- Dockerfile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59c478d2..ea722276 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,10 @@ -FROM golang:latest -MAINTAINER Prometheus Team +FROM sdurrheimer/alpine-golang-make-onbuild +MAINTAINER Prometheus Team -RUN apt-get -qy update && apt-get -qy install vim-common -ENV PKGPATH $GOPATH/src/github.com/prometheus/alertmanager -ENV GOROOT /usr/src/go +USER root +RUN mkdir /alertmanager \ + && chown golang:golang /alertmanager -ADD . $PKGPATH -RUN cd $PKGPATH \ - && go get -d \ - && make \ - && rm -rf $PKGPATH/.deps \ - && mkdir /alertmanager \ - && chown nobody /alertmanager - -USER nobody -WORKDIR /alertmanager -ENTRYPOINT [ "/go/src/github.com/prometheus/alertmanager/alertmanager" ] -EXPOSE 9093 +USER golang +WORKDIR /alertmanager +EXPOSE 9093