diff --git a/Dockerfile b/Dockerfile index 63bfc36..ca7b1ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,16 @@ -FROM gliderlabs/alpine:3.1 +FROM golang:alpine MAINTAINER Knut Ahlers -RUN apk --update add wget && \ - wget --no-check-certificate https://gobuilder.me/get/github.com/Luzifer/badge-gen/badge-gen_master_linux-386.zip && \ - unzip badge-gen_master_linux-386.zip +ADD . /go/src/github.com/Luzifer/badge-gen +WORKDIR /go/src/github.com/Luzifer/badge-gen + +RUN set -ex \ + && apk add --update git ca-certificates \ + && go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \ + && apk del --purge git -ENV PORT 3000 EXPOSE 3000 -ENTRYPOINT ["/badge-gen/badge-gen"] + +ENTRYPOINT ["/go/bin/badge-gen"] +CMD ["--"]