From 7c66213f823f5d4af06cdb6ccb8c53a3a4b49b20 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Aug 2020 13:16:28 +0200 Subject: [PATCH] Dockerfile: build gotestsum from source Building form source is slower, but will support other architectures, such as arm64 Before: => [gotestsum 1/2] ADD https://github.com/gotestyourself/gotestsum/releases/download/v0.4.0/gotestsum_0.4.0_linux_amd64.tar.gz gotestsum.tar.gz 2.3s => [gotestsum 2/2] RUN tar -xf gotestsum.tar.gz gotestsum -C /go/bin 1.8s After: => [gotestsum 1/1] RUN go get gotest.tools/gotestsum@v0.4.0 13.0s Signed-off-by: Sebastiaan van Stijn --- dockerfiles/Dockerfile.dev | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index f590ba3950..05e3768dc2 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -8,9 +8,8 @@ ARG ESC_VERSION=v0.2.0 RUN GO111MODULE=on go get github.com/mjibson/esc@${ESC_VERSION} FROM golang AS gotestsum -ARG GOTESTSUM_VERSION=0.4.0 -ADD https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_linux_amd64.tar.gz gotestsum.tar.gz -RUN tar -xf gotestsum.tar.gz gotestsum -C /go/bin +ARG GOTESTSUM_VERSION=v0.4.0 +RUN GO111MODULE=on go get gotest.tools/gotestsum@${GOTESTSUM_VERSION} FROM golang AS vndr ARG VNDR_VERSION=v0.1.1