From 1fc9cd8b3e72226cdf1b3a403fbbf8201abbb863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Wed, 23 Jun 2021 22:40:23 +0200 Subject: [PATCH] we need to get the latest tag an work with it in the dockerfile also --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 084982d..9c55eaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,11 @@ ENV CGO_ENABLED 0 ENV GO111MODULE on RUN \ - apk add --no-cache git && \ - git clone -b release https://github.com/minio/minio && cd minio && \ - git checkout release && go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)" + apk add --no-cache git jq && \ + git config --global advice.detachedHead false && \ + LATEST_MINIO_GITHUB=$(wget --quiet "https://api.github.com/repos/minio/minio/releases/latest" -O - | jq -r '.tag_name'); \ + git clone https://github.com/minio/minio && cd minio && \ + git checkout "$LATEST_MINIO_GITHUB" && go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)" FROM alpine:3.12