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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-08-28 13:16:28 +02:00
parent 01d6d2e7a7
commit 7c66213f82
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 3 deletions

View File

@ -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