From c74db77ca0ab594f9ed05df1755435f2d652b448 Mon Sep 17 00:00:00 2001 From: Todd Brown Date: Thu, 13 Jun 2019 15:28:33 -0500 Subject: [PATCH] Decrease docker image size (#1694) * Decrease docker image size rm commands need to be in the same layer as that adds whatever gets cached or is unneeded. This is because docker layers are append only. Signed-off-by: Todd Brown * Add mkdir back in to dockerfile Signed-off-by: Todd Brown --- Dockerfile.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index 12bac5bc3..e34b6b091 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -20,12 +20,12 @@ RUN go get -u github.com/golang/dep/cmd/dep \ && go get -v -u github.com/gobuffalo/packr/v2/packr2 \ && go get -v -u github.com/markbates/filetest \ && go get -v -u github.com/markbates/grift \ -&& go get -v -u github.com/markbates/refresh +&& go get -v -u github.com/markbates/refresh \ +&& rm -rfv $GOPATH/src && mkdir -p $BP -RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0 +# Install golangci +RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0 -# clear out the src so that we can fill it with new versions -RUN rm -rfv $GOPATH/src && mkdir -p $BP WORKDIR $BP ADD go.mod .