diff --git a/dockerfile/dockerfile b/dockerfile/dockerfile index ca17ee0c..2bc8b66a 100644 --- a/dockerfile/dockerfile +++ b/dockerfile/dockerfile @@ -5,7 +5,9 @@ RUN git clone https://github.com/Praqma/helmsman.git RUN go get github.com/Praqma/helmsman/gcs RUN go get github.com/Praqma/helmsman/aws # build a statically linked binary so that it works on stripped linux images such as alpine/busybox. -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' helmsman/. +RUN cd helmsman \ + && TAG=$(git describe --abbrev=0 --tags)-$(date +"%s") \ + && CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-X main.version='$TAG' -extldflags "-static"' . FROM alpine:3.6 as kube ENV KUBE_LATEST_VERSION="v1.8.2"