From 8930153256bb1cd267b1748d6c49d8e71dd20ee5 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 22 Sep 2017 15:27:18 +0200 Subject: [PATCH] Update Dockerfile to golang:alpine template Signed-off-by: Knut Ahlers --- Dockerfile | 15 ++++++++++----- History.md | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a35e04f..7867785 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,16 @@ -FROM golang +FROM golang:alpine -MAINTAINER Knut Ahlers +LABEL maintainer "Knut Ahlers " -RUN go get github.com/Luzifer/password && \ - go install github.com/Luzifer/password +ADD . /go/src/github.com/Luzifer/password +WORKDIR /go/src/github.com/Luzifer/password + +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 EXPOSE 3000 ENTRYPOINT ["/go/bin/password"] -CMD ["serve", "--port=3000"] +CMD ["--"] diff --git a/History.md b/History.md index fe8defe..dbc0be5 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +n.n.n / 2015-07-18 +================== + + * Fix: Dockerfile had wrong argument usage + 1.3.0 / 2015-05-29 ==================