diff --git a/Dockerfile b/Dockerfile index 19b9baf..421fae0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -FROM alpine +FROM golang:alpine -MAINTAINER Knut Ahlers - -ENV GOPATH /go:/go/src/github.com/Luzifer/mondash/Godeps/_workspace -EXPOSE 3000 +MAINTAINER Knut Ahlers ADD . /go/src/github.com/Luzifer/mondash WORKDIR /go/src/github.com/Luzifer/mondash -RUN apk --update add git go ca-certificates \ +RUN set -ex \ + && apk add --update git \ && go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \ - && apk del --purge go git + && apk del --purge git + +EXPOSE 3000 ENTRYPOINT ["/go/bin/mondash"] +CMD ["--"]