From e6e9e9ea4256ea27b599a7a3f258255a3a9bd86e Mon Sep 17 00:00:00 2001 From: Andreas Auernhammer Date: Tue, 7 Apr 2020 18:56:09 +0200 Subject: [PATCH] build a versioned KES binary in docker container This commit uses the `release` command added by 08be13b to build a binary with release information when building the docker image. This can be verified by running: ``` docker build - < Dockerfile ``` and then ``` docker run -v ``` --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a38c09b8..896a849f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,8 @@ ENV GOPROXY https://proxy.golang.org RUN \ apk add --no-cache git && \ - go install -v -ldflags "-s -w" github.com/minio/kes/cmd/kes + go install -v -ldflags "-s -w" github.com/minio/kes/cmd/release && \ + go install -v -ldflags "-s -w -X main.version=$(release)" github.com/minio/kes/cmd/kes FROM alpine:3.10